Debian Codegraph @

man/dist.dendlist.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/distinct_edges.R
3 \name{dist.dendlist}
4 \alias{dist.dendlist}
5 \title{Topological Distances Between Two dendrograms}
6 \usage{
7 dist.dendlist(dend, method = c("edgeset"), ...)
8 }
9 \arguments{
10 \item{dend}{a \link{dendlist}}
11
12 \item{method}{currently only 'edgeset' is implemented.}
13
14 \item{...}{Ignored.}
15 }
16 \value{
17 A \link{dist} object with topological distances between all trees
18 }
19 \description{
20 This function seems to bring different results than ape -
21 checking this out is still an open issue: \href{https://github.com/talgalili/dendextend/issues/97}{github issue}
22
23 This function computes the \href{https://en.wikipedia.org/wiki/Robinson–Foulds_metric}{Robinson-Foulds distance}
24 (also known as symmetric difference)
25 between two dendrograms. This is the number of edges (branches) in tree_1
26 with a combination of labels that exist in
27 it but not in any subtree of tree2,
28 plus the same calculation of tree2 when compared to tree1.
29 This is the sum of length of \link{distinct_edges}(x,y) with
30 \link{distinct_edges}(y,x).
31
32 This function might implement other topological distances in the future.
33 }
34 \examples{
35
36 x <- 1:5 \%>\%
37 dist() \%>\%
38 hclust() \%>\%
39 as.dendrogram()
40 y <- set(x, "labels", 5:1)
41
42 dist.dendlist(dendlist(x1 = x, x2 = x, y1 = y))
43 dend_diff(x, y)
44
45 # Larger trees
46 x <- 1:6 \%>\%
47 dist() \%>\%
48 hclust() \%>\%
49 as.dendrogram()
50 y <- set(x, "labels", c(1:3, 6, 4, 5))
51
52 dend_diff(x, y)
53 dist.dendlist(dendlist(x, y))
54 distinct_edges(x, y)
55 distinct_edges(y, x)
56 length(distinct_edges(x, y)) + length(distinct_edges(y, x)) # dist.dendlist
57 }
58 \seealso{
59 \link{distinct_edges},
60 \link[ape]{dist.topo},
61 \link[distory]{dist.multiPhylo},
62 \link[phangorn]{treedist},
63 }