allmaxdist {convevol} | R Documentation |
Calculates maxdist for all pairs of taxa in a phylogeny.
Description
allmaxdist Uses maxdist to calcualte the maximum phenotypic. distance between the ancestors of all pairs of taxa in a phylogeny. By default outputs these as a matrix, but can also output a list. Can take some time to run for large trees.
Usage
allmaxdist(phyl, phendata, mat = TRUE)
Arguments
phyl |
The phylogeny of interest in phylo format |
phendata |
Phenotypic data for all tips |
mat |
Whether or not to export the values in a matrix (default) or a list |
Details
Regarding the output: the matrix is better organized, but the list avoids all the zeroes and is probably better for making histograms.
Value
A matrix or list of all maxdist values for all pairs of taxa in the phylogeny.
References
Paradis, E., J. Claude, and K. Strimmer (2004) APE: Analyses of phylogenetics and evolution in R langauge. Bioinformatics, 20, 289-290.
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol. 3 217-223.
Examples
phyl<-rtree(10)
phendata<-fastBM(phyl,nsim=2)
answer<-allmaxdist(phyl,phendata,mat=TRUE)