Description Usage Arguments Value Author(s) Examples
Calculates n
!, i.e. the n
:th factorial by calling
gamma(n+1)
and first asserting that n
is an integer.
The largest factorial that can be calculated is 170!.
1 | factorial(x)
|
x |
An |
.
Returns a number (not an integer since integers can not store large enough values).
Henrik Bengtsson
1 2 | factorial(4) == 24
# [1] TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.