all.equal.phylo {ape} | R Documentation |
This function makes a global comparison of two phylogenetic trees.
## S3 method for class 'phylo': all.equal(target, current, ...)
target |
an object of class "phylo" . |
current |
an object of class "phylo" . |
... |
further arguments passed to or from other methods. |
This function is meant to be an adaptation of the generic function
all.equal
for the comparison of phylogenetic trees.
A single phylogenetic tree may have several representations in the Newick
format and in the "phylo"
class of objects used in `ape'. One
aim of the present function is to be able to identify whether two
objects of class "phylo"
represent the same phylogeny.
If both trees are strictly similar, the logical TRUE
is
returned. Otherwise, the different elements of the trees (numbers of
tips, numbers of nodes, tip labels, tree topologies) are compared, and
the results of these comparisons are printed.
Emmanuel Paradis paradis@isem.univ-montp2.fr
all.equal
for the generic R function
### maybe the simplest example of two representations ### for the same rooted tree t1 <- read.tree(text = "((a:1,b:1):1,c:2);") t2 <- read.tree(text = "(c:2,(a:1,b:1):1);") all.equal(t1, t2)