simulate_data | R Documentation |
Creates nclust
clusters normally distributed around 1:nclust
simulate_data(
n = 100,
sd = 0.3,
nclust = 30,
dims = 2,
frac_na = NULL,
add_true_clust = TRUE,
id_column = TRUE
)
n |
number of observations per cluster |
sd |
sd |
nclust |
number of clusters |
dims |
number of dimensions |
frac_na |
fraction of NA in the first dimension |
add_true_clust |
add a column with the true cluster ids |
id_column |
add a column with the id |
simulated data
simulate_data(n = 100, sd = 0.3, nclust = 5, dims = 2)
# add 20% missing data
simulate_data(n = 100, sd = 0.3, nclust = 5, dims = 2, frac_na = 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.