File: linearMrca.Rd

package info (click to toggle)
r-cran-treespace 1.1.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,444 kB
  • sloc: cpp: 24; sh: 13; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metrics.R
\name{linearMrca}
\alias{linearMrca}
\title{Linear MRCA function}
\usage{
linearMrca(tree, k = 0)
}
\arguments{
\item{tree}{an object of the class \code{phylo} which should be rooted.}

\item{k}{(optional) number of tips in tree, for faster computation}
}
\description{
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.
}
\examples{

## 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)


}
\author{
Michelle Kendall \email{michelle.louise.kendall@gmail.com}
}