Learn R Programming

TreeSearch (version 0.2.2)

Cladewise: Reorder tree Cladewise

Description

A wrapper for ape:::.reorder_ape. Calling this C function directly is approximately twice as fast as using ape::cladewise or ape::postorder

Usage

Cladewise(tree, nTaxa = NULL, edge = tree$edge)

Postorder(tree, nTaxa = length(tree$tip.label), edge = tree$edge)

PostorderEdges(parent, child, nEdge = length(parent), nNode = nEdge/2L, nTaxa = nNode + 1L)

Pruningwise(tree, nTaxa = length(tree$tip.label), edge = tree$edge)

Preorder(tree)

Arguments

tree

A tree of class phylo.

nTaxa

(optional) number of tips in the tree

edge

(optional) the value of tree$edge

parent

the first column of the edge matrix of a tree of class phylo, i.e. tree$edge[, 1]

child

the second column of the edge matrix of a tree of class phylo, i.e. tree$edge[, 2]

nTaxa

Number of terminal taxa in tree.

Value

A tree with nodes numbered in postorder

Functions

  • Postorder: Reorder tree in Postorder

  • PostorderEdges: Reorder parent and child edges in Postorder

  • Pruningwise: Reorder tree Pruningwise

  • Preorder: Reorder tree in Preorder (special case of cladewise)