Rev Language Reference


mrcaIndex

Returns the index of the most recent common ancestor (MRCA) of a given `clade` in a given `tree`.

Aliases

  • getMRCA

Usage

mrcaIndex(Tree tree, Clade clade)

Arguments

tree : Tree (pass by const reference)
The tree which is used to compute the MRCA.
clade : Clade (pass by value)
The clade for which the MRCA is searched.

Return Type

Example

# Read in a tree
tr <- readTrees(text="(((Lemur,Galago),Tarsius),((Pan,Homo),Alouatta));")[1]

# Find the node index of the MRCA of Pan and Homo
mrcaIndex(tr, clade("Homo", "Pan"))

See Also