multichoose: Calculate multinomial coefficient

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

This function calculates the multinomial coefficient

(∑ n_j)! / ∏ n_j!.

where n_j's are the number of multiplicities in the multiset.

Usage

1
multichoose(n, bigz = FALSE)

Arguments

n

a vector of group sizes

bigz

use gmp's Big Interger

Value

multinomial coefficient

Examples

1
2
# (3+1+1)!/ (3! 1! 1!) = 20
multichoose(c(3,1,1))

randy3k/iterpc documentation built on Jan. 9, 2020, 2:02 a.m.