Ecological trajectory analysis ecotraj website

Introduction

Package ecotraj is a package providing Ecological Trajectory Analysis (ETA), a framework to analyse temporal changes (i.e. dynamics) in ecological entities defined as trajectories on a chosen multivariate space.

ETA is related to the following publications:

Package installation

Package ecotraj can be found at CRAN. In addition, the latest stable ecotraj R package can also be installed from GitHub as follows:

# remotes::install_github("emf-creaf/ecotraj")
install.packages("ecotraj", repos = c('https://emf-creaf.r-universe.dev', 'https://cloud.r-project.org'))

Documentation and training

Package functions

The following lists the main package functions, grouped by analysis framework:

Functions for Ecological Trajectory Analysis (ETA)

Name Short description
defineTrajectories() Defines trajectory objects to be analyzed.
subsetTrajectories() Subsets trajectories corresponding to selected set of sites or surveys from a dataset containing multiple trajectories.
trajectoryLengths() Calculates lengths of directed segments and total path length of trajectories.
trajectoryLengths2D() Calculates lengths of directed segments and total path lengths of trajectories from 2D coordinates given as input.
trajectorySpeeds() Calculates speeds of directed segments and total path speed of trajectories.
trajectorySpeeds2D() Calculates speeds of directed segments and total path speed of trajectories from 2D coordinates given as input.
trajectoryAngles() Calculates the angle between consecutive pairs of directed segments or between segments of ordered triplets of points.
trajectoryDirectionality() Assesses the level directionality of each trajectory.
trajectoryAngles2D() Calculates the angle between consecutive pairs of directed segments or between segments of ordered triplets of points from 2D coordinates.
trajectoryConvergence() Performs the Mann-Kendall trend test on (1) the distances between trajectories; (2) the distance between points of one trajectory to the other; or (3) the variance of states among trajectories.
trajectoryCorrespondence() Performs a permutation test of pairwise dynamic correspondence between trajectories sensitive to trajectory shape and movement direction.
trajectoryRMA() Tests and qualifies the relative movements of ecological trajectories.
trajectoryInternalVariation() Assesses the internal variability within each trajectory.
trajectoryDistances() Estimates distances between pairs of ecosystem trajectories.
trajectoryShifts() Calculates trajectory shifts (i.e. advances and delays) between trajectories assumed to follow a similar path but with different speeds or time lags.
trajectoryPlot() Draws trajectories in a 2D-plot corresponding to the input coordinates.
trajectoryPCoA() Performs principal coordinates analysis and draws trajectories in the ordination scatterplot.
trajectoryMetrics() Calculates several (whole path) metrics on trajectories.
trajectoryWindowMetrics() Calculates several metrics on subtrajectories defined using moving windows.
dynamicVariation() Assesses the amount of dynamic variation observed across trajectories and the relative contribution of each of them.
interpolateTrajectories() Relocates trajectory ecological states to those corresponding to input times, via linear interpolation.
smoothTrajectories() Performs multivariate smoothing on trajectory data using a Gaussian kernel.
centerTrajectories() Shifts all trajectories to the center of the multivariate space and returns a modified distance matrix.
averageTrajectories() Creates an “average” trajectory where the position of each observation is the average of the position of the corresponding observations of the input trajectories.

Functions specific for Cyclical Ecological Trajectory Analysis (CETA)

Name Short description
extractCycles() Extracts (i.e. subsets) cycles from cyclical trajectories.
extractFixedDateTrajectories() Extracts fixed-date trajectories from cyclical trajectories.
cycleShifts() Estimates cyclical shifts (i.e. advances or delays).
cycleConvexity() Estimates the degree of convexity of cycles.
cycleMetrics() Calculates several (whole path) metrics on cycles.
cyclePCoA() Performs Principal Coordinates Analysis and draws cycles in the ordination scatter plot.
fixedDateTrajectoryPCoA() Performs Principal Coordinates Analysis and draws fixed date trajectories in the ordination scatter plot.

Functions for Ecological Quality Assessment (EQA)

Name Short description
stateEnvelopeVariability() Assess the variability of a set of states taken as reference envelope.
trajectoryEnvelopeVariability() Assess the variability of a set of trajectories taken as reference envelope.
compareToStateEnvelope() Evaluate the ecological quality of stations/observations with respect to a set of states taken as reference envelope.
compareToTrajectoryEnvelope() Evaluate the ecological quality of stations/observations with respect to a set of trajectories taken as reference envelope.

Related package

The R package ecoregime, by Martina Sánchez-Pinillos, implements the Ecological Dynamic Regimes (EDR) framework to characterize and compare groups of ecological trajectories in multidimensional spaces defined by ecosystem state variables.

References