TreeTools (version 0.1.3)

RandomTree: Generate a random tree topology

Description

Generates a binary tree with a random topology on specified tips, optionally rooting the tree on a given tip.

Usage

RandomTree(tips, root = FALSE)

Arguments

tips

An integer specifying the number of tips, or a character vector naming the tips, or any other object from which tip labels can be extracted with function TipLabels.

root

Tip to use as root (if desired; FALSE otherwise)

Value

RandomTree returns a random tree of class phylo, with the specified tips, and no branch lengths specified.

See Also

Other tree generation functions: BalancedTree, NJTree, PectinateTree, SingleTaxonTree, TreeNumber

Examples

Run this code
# NOT RUN {
RandomTree(letters[1:5])

data('Lobo')
RandomTree(Lobo.phy)

# }

Run the code above in your browser using DataLab