Learn R Programming

PVR (version 0.3)

PVRdecomp: Phylogenetic distances matrix (eigen)decomposition.

Description

The PVRdecomp function decompose phylogenetic distance matrices (computed based on phylogenies) into a set of orthongonal eigenvectors

Usage

PVRdecomp(phy, type = "newick", dist = NULL, scale = FALSE, ...)

Arguments

phy

An object of class phylo that contains a ultrametric phylogeny with branch lengths or a character string that represents a phylogeny file (must have full path) of type given by type.

type

A character string with the phylogeny file format. It can be "newick" or "nexus". Used only if phy is a character string, ignored otherwise.

dist

A phylogenetic distance matrix. Not used.

scale

Logical. Should the phylogenetic distances be scaled into the range of 0 to 1. Default is FALSE.

Not used.

Value

The PVRdecomp funtion returns a object of (S4) class PVR with an Eigen slot that contains eigenvalues and eigenvectors computed after the matrix decomposition.

References

Diniz-Filho, J.A.F., Sant'Ana, C.E.R. and Bini, L.M. (1998). An eigenvector method for estimating phylogenetic inertia. Evolution 52:1247-1262.

Diniz-filho, J.A.F., Rangel, T.F., Santos, T. and Bini, L.M. (2012). Exploring patterns of interespecific variation in quantitative traits using sequential phylogenetic eigenvector regressions. Evolution, 66(4):1079-1090.

Diniz-filho, J.A.F., Bini, L.M., Rangel, T.F., Morales-Castilla, I., Olalla-Tarraga, M.A., Rodriguez, M.A. and Hawkins, B.A. (2012). On the selection of phylogenetic eigenvectors for ecological analyses. Ecography, 35:239-249.

See Also

PVR, PSR

Examples

Run this code
# NOT RUN {
library(ape)
tree <- rcoal(10)
#Decomposing phylogenetic distance matrix derived from tree into a set of orthogonal vectors
x <- PVRdecomp(tree, scale = TRUE)
str(x)
# }

Run the code above in your browser using DataLab