Learn R Programming

convevol (version 2.2.1)

maxdist: Calculates the maximum phenotypic distance between the lineages leading to a pair of taxa.

Description

maxdist uses ancestral state reconstruction to determine the maximum distance between any ancestors of those two taxa.

Usage

maxdist(phyl, phendata, t1, t2)

Value

The maximum phenotypic distance between the two taxa

Arguments

phyl

The phylogeny of interest in phylo format

phendata

Phenotypic data for all tips

t1

The first taxon of interest

t2

The second taxon of interest

Details

Returns the maximum Euclidean distance between any pair of ancestors of the two taxa, whether or not those two ancestors are contemporaries.

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

Run this code

phyl<-rtree(10)
phendata<-fastBM(phyl,nsim=2)
answer<-maxdist(phyl,phendata,1,10)

Run the code above in your browser using DataLab