mvpd: MPD and VPD (mean and variance of pairwise distance)

View source: R/pd.R

mvpdR Documentation

MPD and VPD (mean and variance of pairwise distance)

Description

Calculate MPD and VPD. The distance matrix can be from functional traits or phylogeny. This function is the same as 'picante::mpd' when 'abundance.weighted = FALSE'; it is, however, different when 'abundance.weighted = TRUE' because this function does not include the diagonal values while 'picante::mpd' does, which is actually equal to Rao's Q instead of MPD (de Bello et al, 2016, Oecologia).

Usage

mvpd(samp, dis, abundance.weighted = FALSE)

Arguments

samp

A site by species data frame, site names as row names.

dis

A distance matrix.

abundance.weighted

Whether to weight by species abundance? Default is 'FALSE'.

Value

A data frame with three columns: site, mpd, and vpd.


daijiang/lirrr documentation built on Feb. 3, 2024, 5:42 p.m.