Learn R Programming

phytools (version 0.2-40)

findMRCA: Get the MRCA of a set of taxa

Description

This function returns the most recent common ancestor (node number) for a set of taxa.

Usage

findMRCA(tree, tips=NULL)

Arguments

tree
a phylogenetic tree as an object of class "phylo".
tips
a vector containing a set of tip labels.

Value

  • The node number of the MRCA, or a matrix of node numbers (if tips==NULL).

Details

If tips==NULL will return the result of a normal function call to mrca.

See Also

mrca

Examples

Run this code
tree<-pbtree(n=20)
	anc<-findMRCA(tree,c("t1","t10","t15"))

Run the code above in your browser using DataLab