Description Usage Arguments Value Examples
View source: R/bootstrap-clusters.R
Resample clusters from an observed data set
1 | bootstrap_clusters(clusters, n_boot = NULL)
|
clusters |
data frame of observed data with the following columns
|
n_boot |
number of clusters to resample. If NULL, will re-sample as many in original cluster |
data frame with new cluster_id variable but can be traced back to original cluster
through the column original_id
1 2 3 4 5 6 7 8 9 10 | data <- data.frame(cluster_id = c("a", "a", "a",
"b", "b",
"c", "c",
"d"),
x = c(1, 0, 1,
1, 1,
0, 1,
0))
boot_clusters <- bootstrap_clusters(clusters = data)
boot_clusters
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.