Description Usage Arguments Details Value Author(s) See Also Examples
These two functions collapse or resolve multichotomies in phylogenetic trees.
1 2 |
phy |
an object of class |
random |
a logical value specifying whether to resolve the
multichotomies randomly (the default) or in the order they appear in
the tree (if |
tol |
a numeric value giving the tolerance to consider a branch length significantly greater than zero. |
multi2di
transforms all multichotomies into a series of
dichotomies with one (or several) branch(es) of length zero.
di2multi
deletes all branches smaller than tol
and
collapses the corresponding dichotomies into a multichotomy.
Both functions return an object of class "phylo"
.
Emmanuel Paradis
1 2 3 4 5 6 7 8 9 10 | data(bird.families)
is.binary.tree(bird.families)
is.binary.tree(multi2di(bird.families))
all.equal(di2multi(multi2di(bird.families)), bird.families)
### To see the results of randomly resolving a trichotomy:
tr <- read.tree(text = "(a:1,b:1,c:1);")
layout(matrix(1:4, 2, 2))
for (i in 1:4)
plot(multi2di(tr), use.edge.length = FALSE, cex = 1.5)
layout(matrix(1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.