Learn R Programming

phangorn (version 2.12.1)

allTrees: Compute all trees topologies.

Description

allTrees computes all bifurcating tree topologies for rooted or unrooted trees with up to 10 tips. The number of trees grows fast.

Usage

allTrees(n, rooted = FALSE, tip.label = NULL)

Value

an object of class multiPhylo.

Arguments

n

Number of tips (<=10).

rooted

Rooted or unrooted trees (default: rooted).

tip.label

Tip labels.

Author

Klaus Schliep klaus.schliep@gmail.com

See Also

rtree, nni, howmanytrees, dfactorial

Examples

Run this code

trees <- allTrees(5)

old.par <- par(no.readonly = TRUE)
par(mfrow = c(3,5))
for(i in 1:15)plot(trees[[i]])
par(old.par)

Run the code above in your browser using DataLab