Trajectory smoothing using a Gaussian kernel
Usage
trajectorySmoothing(
d,
sites,
surveys = NULL,
survey_times = NULL,
kernel_scale = 1,
fixed_endpoints = TRUE
)
Arguments
- d
A symmetric
matrix
or an object of classdist
containing the distance values between pairs of ecosystem states.- sites
A vector indicating the site corresponding to each ecosystem state.
- surveys
A vector indicating the survey corresponding to each ecosystem state (only necessary when surveys are not in order).
- 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
Value
An object of class dist