Description Usage Arguments Value Author(s) References Examples
View source: R/as.rateMatrix.R
Function to generate a rateMatrix
object containing a set of variance covariance matrices.
Note that as.rateMatrix
calls the CAIC function vcv.array
multiple times and this can be slow for large phylogenies (though faster than using the ape equivalent vcv.phylo
).
1 | as.rateMatrix(phy, x, data)
|
phy |
An object of class "phylo" (see ape). |
x |
The explanatory (discrete) variable used to define the hypothesised rate categories. Can be specified as a column number or column name |
data |
The explanatory (discrete) variable used to define the hypothesised rate categories. Can be specified as a column number or column name |
rateMatrix An object of class "rateMatrix" - a list of matrices describing the expected variances and covariances of between species. Each matrix refers to the variances and covariances for a given state of x (see Thomas et al. 2006).
Gavin Thomas
Thomas GH, Freckleton RP, & Szekely T. 2006. Comparative analyses of the influence of developmental mode on phenotypic diversification rates in shorebirds. Proceedings of the Royal Society B 273, 1619-1624.
1 2 3 4 5 6 | ## Read in phylogeny and data from Thomas et al. (2009)
data(anolis.tree)
data(anolis.data)
## Convert data to class rateMatrix
anolis.rateMatrix <- as.rateMatrix(phy=anolis.tree, x="geo_ecomorph", data=anolis.data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.