| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/noded_with_condition.R |
| 3 |
\name{which_leaf} |
| 4 |
\alias{which_leaf} |
| 5 |
\title{Which node is a leaf?} |
| 6 |
\usage{ |
| 7 |
which_leaf(dend, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{dend}{a dendrogram dend} |
| 11 |
|
| 12 |
\item{...}{ignored.} |
| 13 |
} |
| 14 |
\value{ |
| 15 |
A logical vector with the length of \link{nnodes}, |
| 16 |
which gives a TRUE when a node is a leaf. |
| 17 |
} |
| 18 |
\description{ |
| 19 |
Gives a vector as the number of nodes (\link{nnodes}), |
| 20 |
which gives a TRUE when a node is a leaf. |
| 21 |
} |
| 22 |
\examples{ |
| 23 |
\dontrun{ |
| 24 |
|
| 25 |
library(dendextend) |
| 26 |
|
| 27 |
# Getting the dend dend |
| 28 |
set.seed(23235) |
| 29 |
ss <- sample(1:150, 10) |
| 30 |
dend <- iris[ss, -5] \%>\% |
| 31 |
dist() \%>\% |
| 32 |
hclust() \%>\% |
| 33 |
as.dendrogram() |
| 34 |
dend \%>\% plot() |
| 35 |
|
| 36 |
which_leaf(dend) |
| 37 |
} |
| 38 |
} |
| 39 |
\seealso{ |
| 40 |
\link{noded_with_condition}, \link{is.leaf}, \link{nnodes} |
| 41 |
} |