Add a cluster membership variable to the active dataset

# S3 method for hclus
store(dataset, object, nr_clus = 2, name = "", ...)

Arguments

dataset

Dataset to append to cluster membership variable to

object

Return value from hclus

nr_clus

Number of clusters to extract

name

Name of cluster membership variable

...

Additional arguments

Details

See https://radiant-rstats.github.io/docs/multivariate/hclus.html for an example in Radiant

See also

hclus to generate results

summary.hclus to summarize results

plot.hclus to plot results

Examples

hclus(shopping, vars = "v1:v6") %>% store(shopping, ., nr_clus = 3) %>% head()
#> # A tibble: 6 x 8 #> id v1 v2 v3 v4 v5 v6 hclus3 #> <int> <int> <int> <int> <int> <int> <int> <fct> #> 1 1 6 4 7 3 2 3 1 #> 2 2 2 3 1 4 5 4 2 #> 3 3 7 2 6 4 1 3 1 #> 4 4 4 6 4 5 3 6 3 #> 5 5 1 3 2 2 6 4 2 #> 6 6 6 4 6 3 3 4 1