Get edgePar of dendrogram's leaves
This is helpful to get the attributes of branches of the leaves. For example, after we use color_branches, to get the colors of the labels to match (since getting the colors of branches to match those of the labels can be tricky).
get_leaves_edgePar(dend, simplify = FALSE, ...)
dend |
a dendrogram object |
simplify |
logical (default is FALSE). If TRUE, then the return vector is
after using |
... |
not used |
A list (or a vector) with the dendrogram's leaves edgePar attribute
# define dendrogram object to play with: hc <- hclust(dist(USArrests[1:5, ]), "ave") dend <- as.dendrogram(hc) # get_leaves_edgePar(dend) # error :) get_leaves_edgePar(dend) dend <- color_branches(dend, k = 3) get_leaves_edgePar(dend) get_leaves_edgePar(dend, TRUE) dend <- dend %>% set("branches_lwd", c(2, 1, 2)) get_leaves_edgePar(dend) plot(dend)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.