mpd.: Mean pairwise distance

Description Usage Arguments Details Value Author(s)

Description

Calculates mean pairwise distance separating taxa in a community (slightly modified from the picante function: mpd)

Usage

1
mpd.(samp, dis, abundance.weighted = FALSE, ord = TRUE)

Arguments

samp

Community data matrix.

dis

Interspecific distance matrix.

abundance.weighted

Should mean pairwise diatnces be weighted by species abundance? (default = FALSE).

ord

Order rows and columns of the matrices? (defaults to TRUE). Note that sites are never ordered.

Details

Two changes from original mpd function: (1) avoid NA values (TODO: better description here). (2) give useful error messages for poorly named samp and dis. Also please be aware that if abundance.weighted = FALSE, then samp should be explicitly a presence-absence matrix (i.e. with zeros and ones only).

Value

Vector of MPD values for each community.

Author(s)

Code modified from original version by Steven Kembel.


funphylocom documentation built on May 2, 2019, 5 p.m.