Learn R Programming

BioGeoBEARS (version 0.2.1)

add_to_downpass_labels: Iterate up and down a tree in C++ LAGRANGE downpass order

Description

This is the utility function for get_lagrange_nodenums, which traces a tree down and up in C++ LAGRANGE's downpass order.

Usage

add_to_downpass_labels(tr, downpass_node_matrix, currnode)

Arguments

tr
A phylo tree object.
downpass_node_matrix
A matrix (tr$Nnode rows, 2 columns). Column 1 has R's native internal numbering scheme, and column 2 has the node numbers in a LAGRANGE downpass.
currnode
The current node being viewed

Value

downpass_node_matrix A matrix containing node numbers.

Details

This returns a matrix containing (column 1) R's native internal numbering scheme, and (column 2) the node numbers in a LAGRANGE downpass. Note that this is different from LAGRANGE's downpass ordering (see get_lagrange_nodenums).

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

See Also

get_lagrange_nodenums

Examples

Run this code
test=1

Run the code above in your browser using DataLab