Merge Two Clusters
Merge 2 clusters into 1.
merge2Clusters(labels, mainClusterLabel, minorClusterLabel)
labels |
a vector or factor giving the cluster labels |
mainClusterLabel |
label of the first merged cluster. The merged cluster will have this label. |
minorClusterLabel |
label of the second merged cluster. |
A vector or factor of the merged labels.
Bin Zhang and Peter Langfelder
options(stringsAsFactors = FALSE); # Works with character labels: labels = c(rep("grey", 5), rep("blue", 2), rep("red", 3)) merge2Clusters(labels, "blue", "red") # Works with factor labels: labelsF = factor(labels) merge2Clusters(labelsF, "blue", "red") # Works also with numeric labels: labelsN = as.numeric(factor(labels)) labelsN merge2Clusters(labelsF, 1, 3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.