factorial {gregmisc} | R Documentation |
Compute x!, the factorial of x, or log(x!) the natural log of the factorial of x.
factorial(x) lfactorial(x)
x |
numeric vector |
The function factorial
and lfactorial
return the
factorial function and the natural logarithm of the factorial
function:
x! = factorial(x) = 1 * 2 * .. * x = Gamma(1 + x)
factorial(4) lfactorial(40)