View source: R/enumerate.partitions.R
enumerate.partitions | R Documentation |
This function produces a matrix whose rows provide all possible partitions of
the set {1, 2, ..., n}
. These partitions are provided as cluster
labels, where two items are in the same subset (i.e., cluster) if their
labels are equal.
enumerate.partitions(nItems)
nItems |
The size of the set |
A matrix of integers, where each row is a partition encoded as a vector of cluster labels.
# R_CARGO \dontrun{
# R_CARGO # Example disabled since Cargo was not found when installing from source package.
# R_CARGO # You can still run the example if you install Cargo. Hint: cargo::install().
enumerate.partitions(5)
# R_CARGO }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.