Learn R Programming

phytools (version 0.2-20)

matchNodes: Matches nodes between two trees

Description

This function returns a matrix in which the first column contains all the internal nodes for tr1 and the second column contains the matching nodes from tr2, inasmuch as they can be identified. A pair of matching nodes are defined by sharing all descendant leaves in common.

Usage

matchNodes(tr1, tr2, method=c("descendants","distances"))

Arguments

tr1
first tree.
tr2
second tree.
method
method to use to match nodes between trees. "descendants" uses the tip species descended from each node; "distances" uses the distances from the nodes to the tips.

Value

  • a matrix.

Details

Primarily to be used internally by fastAnc.