Last data update: 2014.03.03

R: Calculate the number of r-permutations of a multiset
np_multisetR Documentation

Calculate the number of r-permutations of a multiset

Description

Calculate the number of r-permutations of a multiset

Usage

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

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

Results