nc_multiset: Calculate the number of r-combinations of a multiset

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Calculate the number of r-combinations of a multiset

Usage

1
nc_multiset(f, r, bigz = FALSE)

Arguments

f

the frequencies of the mutliset

r

the number of object drawn from the multiset

bigz

use gmp's Big Interger

Value

the number of combinations (Big Integer from gmp)

Examples

1
2
3
x <- c("a","a","b")
# possible combinations of size 2 are "aa" and "ab".
nc_multiset(table(x), 2) # <- 2

Example output

[1] 2

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