mchoose: Multinomial Coefficient

Description Usage Arguments Details Value Examples

View source: R/helpers.r

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))

Example output

Loading required package: mpoly
Loading required package: stringr
Set Macaulay2 path with setM2Path().
Set Bertini path with setBertiniPath().
Set LattE-integrale path with setLattePath().
Set 4ti2 path with setMarkovPath().
[1] 180

algstat documentation built on May 29, 2017, 10:34 p.m.

Related to mchoose in algstat...