TreeTools (version 1.4.1)

Renumber: Renumber a tree's nodes and tips

Description

Renumber() numbers the nodes and tips in a tree to conform with the phylo standards.

Usage

Renumber(tree)

Arguments

tree

A tree of class phylo.

Value

Renumber() returns a tree of class phylo, numbered in a Cladewise fashion consistent with the expectations of 'ape' functions.

Details

The 'ape' class phylo is not formally defined, but expects trees' internal representation to conform to certain principles: for example, nodes should be numbered sequentially, with values increasing away from the root.

Renumber() attempts to reformat any tree into a representation that will not cause 'ape' functions to produce unwanted results or to crash R.

See Also

Preorder() provides a faster and simpler alternative, but also rotates nodes.

Other tree manipulation: AddTip(), CollapseNode(), ConsensusWithout(), DropTip(), EnforceOutgroup(), LeafLabelInterchange(), MakeTreeBinary(), RenumberTips(), RenumberTree(), RootTree(), SingleTaxonTree(), SortTree(), Subtree()

Examples

Run this code
# NOT RUN {
tree <- RandomTree(letters[1:10])
Renumber(tree)

# }

Run the code above in your browser using DataCamp Workspace