powered by
RandomTree(), PectinateTree(), BalancedTree() and StarTree() generate trees with the specified shapes and leaf labels.
RandomTree()
PectinateTree()
BalancedTree()
StarTree()
RandomTree(tips, root = FALSE)PectinateTree(tips)BalancedTree(tips)StarTree(tips)
PectinateTree(tips)
BalancedTree(tips)
StarTree(tips)
An integer specifying the number of tips, or a character vector naming the tips, or any other object from which TipLabels() can extract leaf labels.
TipLabels()
Character or integer specifying tip to use as root, if desired; or FALSE for an unrooted tree.
FALSE
Each function returns an unweighted binary tree of class phylo with the specified leaf labels. Trees are rooted unless root = FALSE.
phylo
root = FALSE
RandomTree() returns a random topology, optionally rooting the tree on a given tip.
PectinateTree() returns a pectinate (caterpillar) tree.
BalancedTree() returns a balanced (symmetrical) tree.
StarTree() returns a completely unresolved (star) tree.
Other tree generation functions: NJTree(), SingleTaxonTree(), TreeNumber
NJTree()
SingleTaxonTree()
TreeNumber
# NOT RUN { RandomTree(LETTERS[1:10]) data('Lobo') RandomTree(Lobo.phy) plot(PectinateTree(LETTERS[1:10])) plot(BalancedTree(LETTERS[1:10])) plot(StarTree(LETTERS[1:10])) # }
Run the code above in your browser using DataLab