# NOT RUN {
# }
# NOT RUN {
# define dendrogram object to play with:
dend <- USArrests[1:5, ] %>%
dist() %>%
hclust(method = "ave") %>%
as.dendrogram()
plot(dend)
# # same tree, with different order of labels
plot(sample.dendrogram(dend, replace = FALSE))
# # A different tree (!), with some labels duplicated,
# while others are pruned
plot(sample.dendrogram(dend, replace = TRUE))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab