allTrees {phangorn}R Documentation

Compute all trees topologies and nearest neighbor interchange.

Description

allTrees computes all tree topologies for rooted or unrooted trees with up to 10 tips. nni returns a list of all trees which are one nearest neighbor interchange away. Both methods assume bifurcating trees.

Usage

allTrees(n, rooted = FALSE, tip.label = NULL)
nni(tree,  edge.length = FALSE)

Arguments

n Number of tips (<=10).
rooted Rooted or unrooted trees (default: rooted).
tip.label Tip labels.
tree A phylogenetic tree, object of class phylo.
edge.length Keep edge lengths?

Value

an object of class phylo.

Author(s)

Klaus Schliep K.P.Schliep@massey.ac.nz

See Also

fastme, distanceHadamard

Examples

trees <- allTrees(5)
par(mfrow = c(3,5))
for(i in 1:15)plot(trees[[i]])

neighborhood <- nni(trees[[1]])

[Package phangorn version 0.0-5 Index]