Debian Codegraph @

man/dend_diff.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/distinct_edges.R
3 \name{dend_diff}
4 \alias{dend_diff}
5 \alias{dend_diff.dendrogram}
6 \alias{dend_diff.dendlist}
7 \title{Plots two trees side by side, highlighting edges unique to each tree in red.}
8 \source{
9 A \link{dendrogram} implementation for \link[distory]{phylo.diff} from the {distory} package
10 }
11 \usage{
12 dend_diff(dend, ...)
13
14 \method{dend_diff}{dendrogram}(dend, dend2, horiz = TRUE, ...)
15
16 \method{dend_diff}{dendlist}(dend, ..., which = c(1L, 2L))
17 }
18 \arguments{
19 \item{dend}{a dendrogram or \link{dendlist} to compre with}
20
21 \item{...}{passed to \link{plot.dendrogram}}
22
23 \item{dend2}{a dendrogram to compare with}
24
25 \item{horiz}{logical (TRUE) indicating if the dendrogram should be drawn horizontally or not.}
26
27 \item{which}{an integer vector indicating, in the case "dend" is a dendlist,
28 on which of the trees should the modification be performed.
29 If missing - the change will be performed on all of objects in the dendlist.}
30 }
31 \value{
32 Invisible \link{dendlist} of both trees.
33 }
34 \description{
35 Plots two trees side by side, highlighting edges unique to each tree in red.
36 }
37 \examples{
38
39 x <- 1:5 \%>\%
40 dist() \%>\%
41 hclust() \%>\%
42 as.dendrogram()
43 y <- set(x, "labels", 5:1)
44
45 dend_diff(x, y)
46 dend_diff(dendlist(x, y))
47 dend_diff(dendlist(y, x))
48
49 dend1 <- 1:10 \%>\%
50 dist() \%>\%
51 hclust() \%>\%
52 as.dendrogram()
53 dend2 <- dend1 \%>\% set("labels", c(1, 3, 2, 4, 5:10))
54 dend_diff(dend1, dend2)
55 }
56 \seealso{
57 \link{distinct_edges}, \link{highlight_distinct_edges},
58 \link{dist.dendlist}, \link{tanglegram}
59 \link{assign_values_to_branches_edgePar},
60 \link[distory]{distinct.edges},
61 }