CollapseLabels {GreedyEPL} | R Documentation |
CollapseLabels
Description
Performs a permutation on the group labels so that, if K
non-empty groups are present, the labels used are exactly {1, ..., K
}.
Usage
CollapseLabels(decision)
Arguments
decision |
A vector identifying a partition. The entries must be positive integers. |
Details
The labels of the clustering provided {1,...,G}
are mapped into {1,...,K}
(K is less or equal than G
) based on their order of appearance in the vector provided.
Examples
set.seed(123)
decision <- sample(1:50, 50, TRUE)
CollapseLabels(decision = decision)
[Package GreedyEPL version 1.2 Index]