clusters: Returns clusters of an Isopam clustering

View source: R/clusters.R

clustersR 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 isopam.

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

isopam, isotab

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)

isopam documentation built on April 3, 2025, 9:24 p.m.

Related to clusters in isopam...