fastMRCA {phytools} | R Documentation |
This function returns the most recent common ancestor (node number) for a pair of taxa; or, in the case of fastHeight
, the height above the root of the MRCA of a pair of taxa.
fastMRCA(tree, sp1, sp2) fastHeight(tree, sp1, sp2)
tree |
a phylogenetic tree as an object of class |
sp1 |
species name. |
sp2 |
species name. |
This function is mostly redundant with findMRCA
(or findMRCA(...,type="height")
in the case of fastHeight
) but for very large trees will be considerably faster.
The node number of the MRCA or the height above the root (for fastHeight
).
Liam Revell liam.revell@umb.edu
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.
tree<-pbtree(n=2000) anc<-fastMRCA(tree,"t1","t15")