fastMRCA: Get the MRCA (or height above the root of the MRCA) of a pair...

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

Description

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.

Usage

1
2
3
fastMRCA(tree, sp1, sp2)
fastHeight(tree, sp1, sp2)
fastDist(tree, sp1, sp2)

Arguments

tree

a phylogenetic tree as an object of class "phylo".

sp1

species name.

sp2

species name.

Details

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.

Value

The node number of the MRCA or the height above the root (for fastHeight).

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

findMRCA, mrca

Examples

1
2
tree<-pbtree(n=2000)
anc<-fastMRCA(tree,"t1","t15")


Search within the phytools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.