comboGroupsCount | R Documentation |
Calculate the number of partitions of a vector into groups. See the related integer sequences A025035-A025042 at OEIS (E.g. A025036 for Number of partitions of 1, 2, ..., 4n
into sets of size 4.)
comboGroupsCount(v, numGroups = NULL, grpSizes = NULL)
v |
Source vector. If |
numGroups |
An Integer. The number of groups that the vector will be partitioned into. The default is |
grpSizes |
A vector of whole numbers representing the size of each group. The default is |
A numerical value representing the total number of partitions of groups.
When the number of results exceeds 2^{53} - 1
, a number of class bigz
is returned.
Joseph Wood
comboGroupsCount(16, 4)
comboGroupsCount(16, grpSizes = c(1:4, 6))
comboGroupsCount(28, grpSizes = rep(2:5, each = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.