rank_order.dendrogram | R Documentation |
Generally, leaves order value should be a sequence of integer values. From 1 to nleaves(dend). This function fixes trees by using rank on existing leaves order values.
rank_order.dendrogram(dend, ...)
dend |
a dendrogram object |
... |
not used |
A dendrogram, after fixing its leaves order values.
prune
# define dendrogram object to play with:
dend <- USArrests[1:4, ] %>%
dist() %>%
hclust(method = "ave") %>%
as.dendrogram()
# plot(dend)
order.dendrogram(dend)
dend2 <- prune(dend, "Alaska")
order.dendrogram(dend2)
order.dendrogram(rank_order.dendrogram(dend2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.