File: dend_diff.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 (61 lines) | stat: -rw-r--r-- 1,658 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distinct_edges.R
\name{dend_diff}
\alias{dend_diff}
\alias{dend_diff.dendrogram}
\alias{dend_diff.dendlist}
\title{Plots two trees side by side, highlighting edges unique to each tree in red.}
\source{
A \link{dendrogram} implementation for \link[distory]{phylo.diff} from the {distory} package
}
\usage{
dend_diff(dend, ...)

\method{dend_diff}{dendrogram}(dend, dend2, horiz = TRUE, ...)

\method{dend_diff}{dendlist}(dend, ..., which = c(1L, 2L))
}
\arguments{
\item{dend}{a dendrogram or \link{dendlist} to compre with}

\item{...}{passed to \link{plot.dendrogram}}

\item{dend2}{a dendrogram to compare with}

\item{horiz}{logical (TRUE) indicating if the dendrogram should be drawn horizontally or not.}

\item{which}{an integer vector indicating, in the case "dend" is a dendlist,
on which of the trees should the modification be performed.
If missing - the change will be performed on all of objects in the dendlist.}
}
\value{
Invisible \link{dendlist} of both trees.
}
\description{
Plots two trees side by side, highlighting edges unique to each tree in red.
}
\examples{

x <- 1:5 \%>\%
  dist() \%>\%
  hclust() \%>\%
  as.dendrogram()
y <- set(x, "labels", 5:1)

dend_diff(x, y)
dend_diff(dendlist(x, y))
dend_diff(dendlist(y, x))

dend1 <- 1:10 \%>\%
  dist() \%>\%
  hclust() \%>\%
  as.dendrogram()
dend2 <- dend1 \%>\% set("labels", c(1, 3, 2, 4, 5:10))
dend_diff(dend1, dend2)
}
\seealso{
\link{distinct_edges}, \link{highlight_distinct_edges},
\link{dist.dendlist}, \link{tanglegram}
\link{assign_values_to_branches_edgePar},
\link[distory]{distinct.edges},
}