if (FALSE) {
# define dendrogram object to play with:
dend <- USArrests[1:3, ] %>%
dist() %>%
hclust(method = "ave") %>%
as.dendrogram()
plot(dend)
duplicate_leaf(dend, "Alaska", 3)
duplicate_leaf(dend, "Arizona", 2, fix_members = FALSE, fix_order = FALSE)
plot(duplicate_leaf(dend, "Alaska", 2))
plot(duplicate_leaf(dend, "Alaska", 4))
plot(duplicate_leaf(dend, "Arizona", 2))
plot(duplicate_leaf(dend, "Arizona", 4))
}
Run the code above in your browser using DataLab