| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/distinct_edges.R |
| 3 |
\name{partition_leaves} |
| 4 |
\alias{partition_leaves} |
| 5 |
\title{A list with labels for each subtree (edge)} |
| 6 |
\source{ |
| 7 |
A \link{dendrogram} implementation for \link[distory]{partition.leaves} from the {distory} package |
| 8 |
} |
| 9 |
\usage{ |
| 10 |
partition_leaves(dend, ...) |
| 11 |
} |
| 12 |
\arguments{ |
| 13 |
\item{dend}{a dendrogram} |
| 14 |
|
| 15 |
\item{...}{Ignored.} |
| 16 |
} |
| 17 |
\value{ |
| 18 |
A list with the labels for each of the nodes in the dendrogram. |
| 19 |
} |
| 20 |
\description{ |
| 21 |
Returns the set of all bipartitions from all edges, that is: a list with the labels |
| 22 |
for each of the nodes in the dendrogram. |
| 23 |
} |
| 24 |
\examples{ |
| 25 |
|
| 26 |
x <- 1:3 \%>\% |
| 27 |
dist() \%>\% |
| 28 |
hclust() \%>\% |
| 29 |
as.dendrogram() |
| 30 |
plot(x) |
| 31 |
partition_leaves(x) |
| 32 |
\dontrun{ |
| 33 |
set.seed(23235) |
| 34 |
ss <- sample(1:150, 10) |
| 35 |
dend1 <- iris[ss, -5] \%>\% |
| 36 |
dist() \%>\% |
| 37 |
hclust("com") \%>\% |
| 38 |
as.dendrogram() |
| 39 |
dend2 <- iris[ss, -5] \%>\% |
| 40 |
dist() \%>\% |
| 41 |
hclust("single") \%>\% |
| 42 |
as.dendrogram() |
| 43 |
|
| 44 |
partition_leaves(dend1) |
| 45 |
partition_leaves(dend2) |
| 46 |
} |
| 47 |
|
| 48 |
} |
| 49 |
\seealso{ |
| 50 |
\link{distinct_edges}, \link{highlight_distinct_edges}, |
| 51 |
\link{dist.dendlist}, \link{tanglegram}, |
| 52 |
\link[distory]{partition.leaves} |
| 53 |
} |