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).
trajectorySelection(d, sites, selection)centerTrajectories(d, sites, verbose = FALSE)
is.metric(d, tol = 1e-04)
Function centerTrajectories and trajectorySelection return an object of class dist.
A symmetric matrix or an object of class dist containing the distance values between pairs of ecosystem states (see details).
A vector indicating the site corresponding to each ecosystem state.
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.
Provides console output informing about process (useful for large dataset).
Tolerance value for metricity
Miquel De Cáceres, CREAF
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).
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.
trajectoryplots trajectorymetrics