Multinomial Coefficient

Share:

Description

Compute the multinomial coefficient.

Usage

1
mchoose(n, x)

Arguments

n

an integer

x

a vector of integers

Details

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.

Value

...

Examples

1
mchoose(6, c(2,2,1,1))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.