
Last chance! 50% off unlimited learning
Sale ends in
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; or, in the case of fastDist
, the patristic distance between a pair of taxa.
fastMRCA(tree, sp1, sp2)
fastHeight(tree, sp1, sp2)
fastDist(tree, sp1, sp2)
an object of class "phylo"
.
species one name.
species two name.
The node number of the MRCA, the height above the root (for fastHeight
), or the patristic distance between two taxa (for fastDist
).
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.)
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.
# NOT RUN {
tree<-pbtree(n=2000)
anc<-fastMRCA(tree,"t1","t15")
# }
Run the code above in your browser using DataLab