modifiedMPD: Calculate different versions of abundance-weighted MPD

Description Usage Arguments Details Value References Examples

View source: R/modifiedMPD.R

Description

Given a picante-style community data matrix (sites are rows, species are columns), a phylogenetic distance matrix, and a desired method of abundance-weighting, will calculate MPD.

Usage

1
modifiedMPD(samp, dis, abundance.weighted = FALSE)

Arguments

samp

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

dis

Phylogenetic distance matrix

abundance.weighted

One of either "FALSE", "interspecific", "intraspecific", or "complete"

Details

See accompanying publication for details. Non-abundance-weighted and interspecific and intraspecific methods are equivalent to those previously described by Clarke & Warwick.

Value

A vector of MPD values, calculated according to the abundance-weighted method specified.

References

Miller, E. T., D. R. Farine, and C. H. Trisos. 2016. Phylogenetic community structure metrics and null models: a review with new methods and software. Ecography DOI: 10.1111/ecog.02070

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#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)

dists <- ape::cophenetic.phylo(tree)

results <- modifiedMPD(cdm, dists, abundance.weighted = "interspecific")

eliotmiller/metricTester documentation built on Dec. 16, 2019, 12:39 p.m.