convnumsig: Assess the significance of convergent evolution using...

Description Usage Arguments Details Value References Examples

View source: R/convnumsig.R

Description

Simulates evolution along a given phylogeny, using parameters derived from observed data, and calculates the convnum metric for each simulation for a set of user-defined taxa. Then compares the observed convnum value to the simulated values to assess the significance of the observed levels of convergent evolution.

Usage

1
2
convnumsig(phyl, phendata, convtips, nsim, ellipse = NULL,
  plot = FALSE, plotellipse = NULL)

Arguments

phyl

The phylogeny of interest in phylo format

phendata

Phenotypic data for all tips

convtips

A list consisting of the names of all convergent taxa

nsim

The number of simulatons to conduct

ellipse

Optional. An ellipse defining the region of interest, into which groups may or may not converge.

plot

Optional. Describes whether or not to show phylomorphospaces for all of the simulations.

plotellipse

Optional. The ellipse defining the region of interest in the first two dimensions.

Details

None

Value

A list, consisting first of the p-value for the observed convnum, and second of a vector containing all of the simulated convnum values. Also displays a histogram of all of the simulated convnum values.

References

Maechler, M., Rousseeuw, P., Struyf, A., Hubert, M., Hornik, K.(2013). cluster: Cluster Analysis Basics and Extensions. R package version 1.14.4.

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

1
2
3
4
phyl<-rtree(10)
phendata<-fastBM(phyl,nsim=2)
convtips<-c("t1","t2","t3")
answer<-convnumsig(phyl,phendata,convtips,10,plot=FALSE,ellipse=NULL,plotellipse=NULL)

convevol documentation built on May 2, 2019, 6:53 a.m.