File: vcv2phylo.Rd

package info (click to toggle)
r-cran-ape 5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,932 kB
  • sloc: ansic: 7,626; cpp: 116; sh: 17; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 843 bytes parent folder | download | duplicates (7)
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
31
32
33
34
35
\name{vcv2phylo}
\alias{vcv2phylo}
\title{Variance-Covariance Matrix to Tree}
\description{
  This function transforms a variance-covariance matrix into a
  phylogenetic tree.
}
\usage{
vcv2phylo(mat, tolerance = 1e-7)
}
\arguments{
  \item{mat}{a square symmetric (positive-definite) matrix.}
  \item{tolerance}{the numeric tolerance used to compare the branch
    lengths.}
}
\details{
  The function tests if the matrix is symmetric and positive-definite
  (i.e., all its eigenvalues positive within the specified tolerance).
}
\value{
  an object of class \code{"phylo"}.
}
\author{Simon Blomberg}
\seealso{
  \code{\link{vcv}}, \code{\link{corPhyl}}
}
\examples{
tr <- rtree(10)
V <- vcv(tr) # VCV matrix assuming Brownian motion
z <- vcv2phylo(V)
identical(tr, z) # FALSE
all.equal(tr, z) # TRUE
}
\keyword{manip}
\keyword{multivariate}