PVRdecomp: Phylogenetic distances matrix (eigen)decomposition.

Description Usage Arguments Value Author(s) References See Also Examples

Description

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

Usage

1
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.

Author(s)

Santos, T; Diniz-Filho, J.A.F.; Rangel, T.F.; Bini, L.M.

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

1
2
3
4
5
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)

Example output

PVR 0.3 loaded

Formal class 'PVR' [package "PVR"] with 6 slots
  ..@ Eigen    :List of 2
  .. ..$ values : Named num [1:10] 1.9409 0.3604 0.0688 0.0272 0.0225 ...
  .. .. ..- attr(*, "names")= chr [1:10] "c1" "c2" "c3" "c4" ...
  .. ..$ vectors: num [1:10, 1:10] -0.22 -0.22 -0.227 -0.227 -0.229 ...
  .. .. ..- attr(*, "dimnames")=List of 2
  .. .. .. ..$ : NULL
  .. .. .. ..$ : chr [1:10] "c1" "c2" "c3" "c4" ...
  .. ..- attr(*, "class")= chr "eigen"
  ..@ phyDist  : num [1:10, 1:10] 0.1346 0.1075 0.0916 0.0916 0.0905 ...
  ..@ phylo    :List of 4
  .. ..$ edge       : int [1:18, 1:2] 11 12 13 14 14 13 17 18 18 17 ...
  .. ..$ edge.length: num [1:18] 1.0668 0.8051 0.0385 0.1098 0.1098 ...
  .. ..$ tip.label  : chr [1:10] "t2" "t5" "t8" "t1" ...
  .. ..$ Nnode      : int 9
  .. ..- attr(*, "class")= chr "phylo"
  .. ..- attr(*, "order")= chr "cladewise"
  ..@ Selection: list()
  ..@ PVR      : list()
  ..@ VarPart  : list()

PVR documentation built on May 2, 2019, 3:23 a.m.