View source: R/randomizePartition.R
randomizePartition | R Documentation |
It randomizes a partition by randomly relocating a given share of units between the clusters. The group sizes are preserved.
randomizePartition(partition, p, checkSelected = FALSE)
partition |
Initial partition in a vector format. Each unique value (positive integers) represents one cluster. |
p |
The share of relocated units. |
checkSelected |
If |
A partition (in a vector format).
Marjan Cugmas and Aleš Žiberna
randomizePartition(partition = c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3), p = 0.3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.