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

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_readwrite_v1.R

Description

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

Usage

1
2
  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

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).

Value

downpass_node_matrix A matrix containing node numbers.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

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

Matzke_2012_IBS

See Also

get_lagrange_nodenums

Examples

1
test=1

Example output

Loading required package: rexpokit
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

Loading required package: Rcpp
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.