fastMRCA | R Documentation |
Finds the most recent common ancestor (MRCA) for a pair of tip taxa.
fastMRCA(tree, sp1, sp2)
fastHeight(tree, sp1, sp2)
fastDist(tree, sp1, sp2)
tree |
an object of class |
sp1 |
species one name. |
sp2 |
species two name. |
Function (fastMRCA
) 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; or, in the case of fastDist
, the patristic distance between a pair of taxa.
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.
(Also see getMRCA
in the ape package.)
The node number of the MRCA, the height above the root (for fastHeight
), or the patristic distance between two taxa (for fastDist
).
Liam Revell liam.revell@umb.edu
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
getMRCA
, findMRCA
, mrca
tree<-pbtree(n=2000)
anc<-fastMRCA(tree,"t1","t15")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.