np_multiset: Calculate the number of r-permutations of a multiset

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Calculate the number of r-permutations of a multiset

Usage

1
np_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 r-permutations (Big Integer from gmp)

Examples

1
2
3
x = c("a","a","b")
# possible permutations of size 2 are "aa", "ab" and "ba".
np_multiset(table(x), 2) # = 3

randy3k/iterpc documentation built on Aug. 11, 2018, 11:14 p.m.