vcv2phylo | R Documentation |
This function transforms a variance-covariance matrix into a phylogenetic tree.
vcv2phylo(mat, tolerance = 1e-7)
mat |
a square symmetric (positive-definite) matrix. |
tolerance |
the numeric tolerance used to compare the branch lengths. |
The function tests if the matrix is symmetric and positive-definite (i.e., all its eigenvalues positive within the specified tolerance).
an object of class "phylo"
.
Simon Blomberg
vcv
, corPhyl
tr <- rtree(10)
V <- vcv(tr) # VCV matrix assuming Brownian motion
z <- vcv2phylo(V)
identical(tr, z) # FALSE
all.equal(tr, z) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.