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 19, 2017, 9:06 p.m.
Search within the algstat package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.