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

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

Related to mchoose in algstat...