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

iterpc documentation built on Aug. 10, 2018, 1:14 a.m.