powered by
Calculate the number of r-combinations of a multiset
nc_multiset(f, r, bigz = FALSE)
the frequencies of the mutliset
the number of object drawn from the multiset
use gmp's Big Interger
the number of combinations (Big Integer from gmp)
# NOT RUN { x <- c("a","a","b") # possible combinations of size 2 are "aa" and "ab". nc_multiset(table(x), 2) # <- 2 # }
Run the code above in your browser using DataLab