Last data update: 2014.03.03

R: Calculate corrected PSC
pscCorrR Documentation

Calculate corrected PSC

Description

Given a phylo object and a picante-style community data matrix (sites are rows, species are columns), calculated corrected phylogenetic species clustering

Usage

pscCorr(samp, tree)

Arguments

samp

A picante-style community data matrix with sites as rows, and species as columns

tree

Phylo object

Details

Returns the inverse of psc as defined in picante

Value

A data frame of correctly calculated PSC values, with associated species richness and name of all communities in input cdm

References

Helmus, M.R., T.J. Bland, C.K. Williams, & A.R. Ives. 2007. Phylogenetic measures of biodiversity. The American Naturalist. 169:E69-E83.

Examples

#simulate tree with birth-death process
tree <- geiger::sim.bdtree(b=0.1, d=0, stop="taxa", n=50)

sim.abundances <- round(rlnorm(5000, meanlog=2, sdlog=1)) + 1

cdm <- simulateComm(tree, richness.vector=10:25, abundances=sim.abundances)

results <- pscCorr(samp=cdm, tree=tree)

Results