trajectoryutils: Utility functions for Ecological Trajectory Analysis

trajectoryutilsR Documentation

Utility functions for Ecological Trajectory Analysis

Description

The set following set of utility functions are provided:

  • Function trajectorySelection allows selecting the submatrix of distances corresponding to a given subset of trajectories.

  • Function centerTrajectories shifts all trajectories to the center of the compositional space and returns a modified distance matrix.

  • Function is.metric checks whether the input dissimilarity matrix is metric (i.e. all triplets fulfill the triangle inequality).

Usage

trajectorySelection(d, sites, selection)

centerTrajectories(d, sites, verbose = FALSE)

is.metric(d, tol = 1e-04)

Arguments

d

A symmetric matrix or an object of class dist containing the distance values between pairs of ecosystem states (see details).

sites

A vector indicating the site corresponding to each ecosystem state.

selection

A character vector of sites, a numeric vector of site indices or logical vector of the same length as sites, indicating a subset of site trajectories to be selected.

verbose

Provides console output informing about process (useful for large dataset).

tol

Tolerance value for metricity

Details

Details of calculations are given in De Cáceres et al (2019). Function centerTrajectories performs centering of trajectories using matrix algebra as explained in Anderson (2017).

Value

Function centerTrajectories and trajectorySelection return an object of class dist.

Author(s)

Miquel De Cáceres, CREAF

References

De Cáceres M, Coll L, Legendre P, Allen RB, Wiser SK, Fortin MJ, Condit R & Hubbell S. (2019). Trajectory analysis in community ecology. Ecological Monographs 89, e01350.

Anderson (2017). Permutational Multivariate Analysis of Variance (PERMANOVA). Wiley StatsRef: Statistics Reference Online. 1-15. Article ID: stat07841.

See Also

trajectoryplots trajectorymetrics


ecotraj documentation built on Nov. 2, 2023, 5:23 p.m.