4 \title{Collapse and Resolve Multichotomies}
6 These two functions collapse or resolve multichotomies in phylogenetic
10 multi2di(phy, random = TRUE)
11 di2multi(phy, tol = 1e-08)
14 \item{phy}{an object of class \code{"phylo"}.}
15 \item{random}{a logical value specifying whether to resolve the
16 multichotomies randomly (the default) or in the order they appear in
17 the tree (if \code{random = FALSE}).}
18 \item{tol}{a numeric value giving the tolerance to consider a branch
19 length significantly greater than zero.}
22 \code{multi2di} transforms all multichotomies into a series of
23 dichotomies with one (or several) branch(es) of length zero.
25 \code{di2multi} deletes all branches smaller than \code{tol} and
26 collapses the corresponding dichotomies into a multichotomy.
29 \code{\link{is.binary.tree}}
31 \author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
33 Both functions return an object of class \code{"phylo"}.
37 is.binary.tree(bird.families)
38 is.binary.tree(multi2di(bird.families))
39 all.equal(di2multi(multi2di(bird.families)), bird.families)
40 ### To see the results of randomly resolving a trichotomy:
41 tr <- read.tree(text = "(a:1,b:1,c:1);")
42 layout(matrix(1:4, 2, 2))
44 plot(multi2di(tr), use.edge.length = FALSE, cex = 1.5)