The following functions are provided to transform trajectories:
Function
smoothTrajectories
performs multivariate smoothing on trajectory data using a Gaussian kernel.Function
centerTrajectories
shifts all trajectories to the center of the multivariate space and returns a modified distance matrix.
Usage
smoothTrajectories(
x,
survey_times = NULL,
kernel_scale = 1,
fixed_endpoints = TRUE
)
centerTrajectories(x, exclude = integer(0))
Arguments
- x
An object of class
trajectories
.- survey_times
A vector indicating the survey time for all surveys (if
NULL
, time between consecutive surveys is considered to be one)- kernel_scale
Scale of the Gaussian kernel, related to survey times
- fixed_endpoints
A logical flag to force keeping the location of trajectory endpoints unmodified
- exclude
An integer vector indicating sites that are excluded from trajectory centroid computation. Note: for objects of class
cycles
,external
are excluded by default.
Value
A modified object of class trajectories
, where distance matrix has been transformed.
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).
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.