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

Example output

[1] 20

iterpc documentation built on March 26, 2020, 7:29 p.m.