Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

allmaxdist

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)

convevol

Analysis of Convergent Evolution

v1.3
GPL-2
Authors
C. Tristan Stayton [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.