clusters | R Documentation |
Provides a vector or data frame with cluster affiliations determined using Isopam.
clusters(x, level = NULL, k = NULL, style = c("flat", "hierarchical"))
x |
Object of class |
level |
An integer scalar or vector with the desired cluster level(s). Level numbers start with 1 for the first division. |
k |
An integer scalar or vector with the desired number(s) of groups |
style |
Whether the labels of the clusters are consecutive ('flat') or nested ('hierarchical', i.e. 1.1, 1.2 etc.). |
Factor vector or data frame with the cluster assignments.
Sebastian Schmidtlein
isopam
, isotab
## load data to the current environment
data(andechs)
## call isopam with the standard options
ip <-isopam(andechs)
## return clusters
clusters(ip)
## clusters of level 2, with labels reflecting the hierarchy
clusters(ip, 2, style = "hierarchical")
## cluster solution with 3 classes
clusters(ip, k = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.