Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getCluster

~ Function: getClusters ~


Description

This function extract a cluster affectation from an ClusterLongData object.

Usage

getClusters(xCld, nbCluster, clusterRank = 1, asInteger = FALSE)

Arguments

xCld

[ClusterLongData]: object from who a cluster should be extracted.

nbCluster

[integer]: number of cluster of the desired cluster.

clusterRank

[integer]: rank of the partition in the clusters list.

asInteger

[logical]: should the cluster be given as a vector of integer ? If FALSE, a vector of LETTERS is return.

Details

This function extract a clusters from an object ClusterLongData. It is almost the same as xCld[paste("c",nbCluster,sep="")][[clusterRank]] except that the individual with too many missing value (and thus excludes from the analysis) will be noted by some NA values.

Value

A vector of numeric or a LETTER, according to the value of asInteger.

See Also

Examples

### Creation of an object ClusterLongData
myCld <- gald(20)

### Computation of some partition
kml(myCld,2:4,3)

### Extraction form the list of partition with 3 clusters
###   of the second clustering
getClusters(myCld,3,2)

kml

K-Means for Longitudinal Data

v2.4.1
GPL (>= 2)
Authors
Christophe Genolini [cre, aut], Bruno Falissard [ctb]
Initial release
2016-02-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.