Open talgalili opened 7 years ago
library(dendextend) by_labels_branches_col dend <- mtcars %>% dist %>% hclust %>% as.dendrogram dend <- dend %>% color_labels(k=4) labels_colors(dend) dend <- dend %>% set("leaves_col", labels_colors(dend)) plot(dend) dend <- assign_values_to_leaves_edgePar(dend=dend, value = labels_colors(dend), edgePar = "col") dend %>% plot