TrajDirectionAutocorrelations: Direction autocorrelation

View source: R/dirn_autocorr.R

TrajDirectionAutocorrelationsR Documentation

Direction autocorrelation

Description

Calculates the autocorrelation of the track for \Deltas 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))

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.

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

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


trajr documentation built on July 9, 2023, 6:03 p.m.