factorial(n) lfactorial(n) choose(n, k, order.matters=F) choose.multinomial(n, m)
choose.multinomial.
Need not be integer for
factorial
or
lfactorial.
n.
factorial(n) is
n!
lfactorial(n) is the natural logarithm
of
n!
choose(n, k) is
n! / (
k!
(n-k)!),
i.e. the binomial coefficients.
choose(n, k, order.matters=T) is
n! /
(n-k)!,
i.e. the number of ordered subsets of length
k from
a set with
n distinct elements.
choose.multinomial(n, m) is
n!/
prod(m!
),
the multinomial coefficients.
These functions use
gamma and
lgamma for computations.
factorial(5) choose(5, 2) choose(5, -1:6) choose.multinomial(6, c(3,1,2)) choose(5, 2, order=T)