clusters {isopam} | R Documentation |
Returns clusters of an Isopam clustering
Description
Provides a vector or data frame with cluster affiliations determined using Isopam.
Usage
clusters(x, level = NULL, k = NULL, style = c("flat", "hierarchical"))
Arguments
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.). |
Value
Factor vector or data frame with the cluster assignments.
Author(s)
Sebastian Schmidtlein
See Also
Examples
## 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)
[Package isopam version 3.2 Index]