Learn R Programming

trajr (version 1.5.1)

TrajDirectionAutocorrelations: Direction autocorrelation

Description

Calculates the autocorrelation of the track for \(\Delta\)s ranging from 1 to deltaSMax, based on Shamble et al. (2017). trj must have a constant step length (see TrajRediscretize) i.e. all segments in the trajectory must be the same length. deltaS is specified in number of segments. Call TrajDAFindFirstMinimum to locate the first local minimum which may be used to characterise directional periodicity in a trajectory (note that the first local minimum may not exist).

Usage

TrajDirectionAutocorrelations(trj, deltaSMax = round(nrow(trj)/4))

Value

A data frame with class TrajDirectionAutocorrelations and 2 columns, deltaS and C. Plotting this object displays a graph of the direction autocorrelation function, optionally with the location of the first local minimum marked

Arguments

trj

The trajectory to calculate the directional autocorrelations for.

deltaSMax

Maximum delta s to calculate, default is \(1/4\) the number of segments in the trajectory.

References

Shamble, P. S., Hoy, R. R., Cohen, I., & Beatus, T. (2017). Walking like an ant: a quantitative and experimental approach to understanding locomotor mimicry in the jumping spider Myrmarachne formicaria. Proceedings of the Royal Society B: Biological Sciences, 284(1858). doi:10.1098/rspb.2017.0308

See Also

TrajDAFindFirstMinimum, plot.TrajDirectionAutocorrelations