functional_dispersion: Calculates functional dispersion

functional_dispersionR Documentation

Calculates functional dispersion

Description

Calculates functional dispersion from a species-trait matrix and possibly an abundance vector

Usage

functional_dispersion(
  x,
  w,
  a = rep(1, nrow(x)),
  ch = F,
  gower = T,
  returnPartial = F
)

Arguments

x

numeric matrix. Species-trait matrix.

w

numeric vector. A vector of length equal to columns in 'x', which specifies the variable weights. If missing, weights are equal.

a

optional numeric vector. Species-abundances.

ch

a logical. If set to 'TRUE' use convex-hull centroid for the calculation.

gower

a logical. Calculate entropy based on Gower dissimilarity as opposed to euclidean distance.

returnPartial

an optional logical. If true the distances of each species to each center is returned along with the functional dispersion.

Value

a number.

Details

This functions implements functional dispersion, as the mean distance/dissimilarity to the community weighted mean (traits).

It also supplies the option of returning the "partial" dispersions, i.e. the distance/dissimilarity of each species in each site, from that center.

It also supplies the option of calculating the center of mass based on the convex hull of the first 2 or N principal coordinates. Caution should be used, when using this option, since this deviates from the definition of functional dispersion.


asgersvenning/bachelor documentation built on May 2, 2023, 7:06 a.m.