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

If TRUE, also returns the new and old cluster labels. If FALSE, returns only the relabeled classification.

Details

The return type depends on ProvideClusterNames for backward compatibility with existing code.

Value

ProvideClusterNames==FALSE:

RenamedCls

The renamed classification. A vector of cluster labels in which the largest cluster is C1, the second largest is C2, and so forth

ProvideClusterNames==TRUE: List V with

RenamedCls

The renamed classification. A vector of cluster labels in which the largest cluster is C1, the second largest is C2, 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 descending cluster numbers
Cls[Cls==1]=543
Cls[Cls==4]=1

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

FCPS documentation built on Oct. 3, 2026, 9:06 a.m.