mchoose | R Documentation |
Compute the multinomial coefficient.
mchoose(n, x)
n |
an integer |
x |
a vector of integers |
This function computes the multinomial coefficient by computing the factorial of each number on a log scale, differencing log(n!) - sum(log(x!)), and then exponentiating. It then checks to see if this is an integer; if it's not, it issues a warning.
...
mchoose(6, c(2,2,1,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.