| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/prune.R |
| 3 |
\name{prune_leaf} |
| 4 |
\alias{prune_leaf} |
| 5 |
\title{Trims one leaf from a dendrogram} |
| 6 |
\usage{ |
| 7 |
prune_leaf(dend, leaf_name, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{dend}{dendrogram object} |
| 11 |
|
| 12 |
\item{leaf_name}{a character string as the label of the tip we wish to prune} |
| 13 |
|
| 14 |
\item{...}{passed on} |
| 15 |
} |
| 16 |
\value{ |
| 17 |
A dendrogram with a leaf pruned |
| 18 |
} |
| 19 |
\description{ |
| 20 |
Trims (prunes) one leaf from a dendrogram. |
| 21 |
} |
| 22 |
\details{ |
| 23 |
Used through \link{prune} |
| 24 |
} |
| 25 |
\examples{ |
| 26 |
hc <- hclust(dist(USArrests[1:5, ]), "ave") |
| 27 |
dend <- as.dendrogram(hc) |
| 28 |
|
| 29 |
par(mfrow = c(1, 2)) |
| 30 |
plot(dend, main = "original tree") |
| 31 |
plot(prune_leaf(dend, "Alaska"), main = "tree without Alaska") |
| 32 |
} |