mrca: Find Most Recent Common Ancestors Between Pairs

Description Usage Arguments Details Value Author(s)

Description

mrca returns for each pair of tips (and nodes) its most recent common ancestor (MRCA).

getMRCA returns the MRCA of two or more tips.

Usage

1
2
mrca(phy, full = FALSE)
getMRCA(phy, tip)

Arguments

phy

an object of class "phylo".

full

a logical indicating whether to return the MRCAs among all tips and nodes (if TRUE); the default is to return only the MRCAs among tips.

tip

a vector of mode numeric or character specifying the tips.

Details

For mrca, the diagonal is set to the number of the tips (and nodes if full = TRUE). If full = FALSE, the colnames and rownames are set with the tip labels of the tree; otherwise the numbers are given as names.

For getMRCA, if tip is of length one or zero then NULL is returned.

Value

a matrix of mode numeric (mrca) or a single numeric value (getMRCA).

Author(s)

Emmanuel Paradis



Search within the ape 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.