File: prune_leaf.Rd

package info (click to toggle)
r-cran-dendextend 1.14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,888 kB
  • sloc: sh: 13; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 696 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prune.R
\name{prune_leaf}
\alias{prune_leaf}
\title{Trims one leaf from a dendrogram}
\usage{
prune_leaf(dend, leaf_name, ...)
}
\arguments{
\item{dend}{dendrogram object}

\item{leaf_name}{a character string as the label of the tip we wish to prune}

\item{...}{passed on}
}
\value{
A dendrogram with a leaf pruned
}
\description{
Trims (prunes) one leaf from a dendrogram.
}
\details{
Used through \link{prune}
}
\examples{
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")
}