powered by
This function calculates the multinomial coefficient $$\frac{(\sum n_j)!}{\prod n_j!}.$$ where \(n_j\)'s are the number of multiplicities in the multiset.
multichoose(n, bigz = FALSE)
a vector of group sizes
use gmp's Big Interger
multinomial coefficient
# NOT RUN { # (3+1+1)!/ (3! 1! 1!) = 20 multichoose(c(3,1,1)) # }
Run the code above in your browser using DataLab