Consider a simple dendrogram like
dend <- 1:5 %>% dist %>% hclust %>% as.dendrogram
How can I annotate the distance (height) on the nodes? I looked up the dendextend
package but it does not offer such a feature. However, I know I can the list of these distances from
heights <- as.list(dend %>% get_nodes_attr("height"))
Any help is highly appreciated.
with(pvclust:::hc2axes(as.hclust(dend)), text(x.axis, y.axis, y.axis, pos = 1))
. – lukeA