ClusterRenameDescendingSize: Cluster Rename Descending Size

View source: R/ClusterRenameDescendingSize.R

ClusterRenameDescendingSizeR Documentation

Cluster Rename Descending Size

Description

Renames the clusters of a classification in descending order.

Usage

ClusterRenameDescendingSize(Cls,

ProvideClusterNames=FALSE)

Arguments

Cls

[1:n numerical vector of numbers defining the classification as the main output of the clustering algorithm for the n cases of data. It has k unique numbers representing the arbitrary labels of the clustering.

ProvideClusterNames

TRUE: Provides in seperate output new and old k numbers, FALSE: simple output

Details

Beware: output changes in this function depending on ProvideClusterNames in order to be congruent to prior code in a large varierity of other packages.

Value

ProvideClusterNames==FALSE:

RenamedCls

The renamed classification. A vector of clusters, were the largest cluster is C1 and so forth

ProvideClusterNames==TRUE: List V with

RenamedCls

The renamed classification. A vector of clusters, were the largest cluster is C1 and so forth

ClusterName

[1:k,1:2] matrix of k new numbers and prior numbers

Author(s)

Michael Thrun, Alfred Ultsch

See Also

ClusterNormalize

Examples

data('Lsun3D')
Cls=Lsun3D$Cls
#not desceending cluster numbers
Cls[Cls==1]=543
Cls[Cls==4]=1

# Now ordered per cluster size and descending
ClusterRenameDescendingSize(Cls)

FCPS documentation built on May 20, 2022, 5:06 p.m.