relabel {labeltodendro} | R Documentation |
If you need to relabel a huge matrix, use relabel.matrix
.
relabel(x)
x |
a vector of integers |
This calls a C
function, hence it is relatively fast.
x<-c(2,2,2,2,1,2,2,2,2) #labels do not appear in increasing order relabel(x) # gives the relabelled vector