prune_leaf | R Documentation |
Trims (prunes) one leaf from a dendrogram.
prune_leaf(dend, leaf_name, ...)
dend |
dendrogram object |
leaf_name |
a character string as the label of the tip we wish to prune |
... |
passed on |
Used through prune
A dendrogram with a leaf pruned
hc <- hclust(dist(USArrests[1:5, ]), "ave")
dend <- as.dendrogram(hc)
par(mfrow = c(1, 2))
plot(dend, main = "original tree")
plot(prune_leaf(dend, "Alaska"), main = "tree without Alaska")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.