linearMrca | R Documentation |
Function to make the most recent common ancestor (MRCA) matrix of a tree, where entry (i,j) gives the MRCA of tips i and j. The function is linear, exploiting the fact that the tree is rooted.
linearMrca(tree, k = 0)
tree |
an object of the class |
k |
(optional) number of tips in tree, for faster computation |
Michelle Kendall michelle.louise.kendall@gmail.com
## generate a random tree
x <- rtree(6)
## create matrix of MRCAs: entry (i,j) is the node number of the MRCA of tips i and j
linearMrca(x,6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.