comboCount | R Documentation |
Calculate the number of combinations/permutations of a vector chosen m
at a time with or without replacement. Additionally, these functions can calculate the number of combinations/permutations of multisets.
comboCount(v, m = NULL, repetition = FALSE, freqs = NULL)
permuteCount(v, m = NULL, repetition = FALSE, freqs = NULL)
v |
Source vector. If |
m |
Number of elements to choose. If |
repetition |
Logical value indicating whether combinations/permutations should be with or without repetition. The default is |
freqs |
A vector of frequencies used for producing all combinations/permutations of a multiset of |
A numerical value representing the total number of combinations/permutations.
When the number of results exceeds 2^{53} - 1
, a number of class bigz
is returned.
comboGeneral
, permuteGeneral
## Same interface as the respective "general" functions:
## i.e. comboGeneral & permuteGeneral
permuteCount(-5)
permuteCount(5)
comboCount(25, 12)
permuteCount(15, 7, TRUE)
comboCount(25, 12, freqs = rep(2, 25))
## Return object of class 'bigz'
comboCount(250, 15, freqs = rep(2, 250))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.