trajr: trajr: trajectory analysis in R

trajrR Documentation

trajr: trajectory analysis in R

Description

A toolkit for the statistical analysis of 2-dimensional animal trajectories.

Details

Trajr operates on trajectories which are arrays of x and y coordinates. It can be used to calculate characteristics such as velocity and acceleration, as well as various measures of straightness or tortuosity. It also provides various convenience functions to assist with operating on multiple trajectories. trajr provides some functionality for operating on 3-dimensional trajectories (see Traj3DFromCoords).

Trajr does not perform object tracking from videos, it operates on existing arrays of coordinates.

Trajectory creation

Most trajr functions operate on a Trajectory object. Trajectorys are created by calling TrajFromCoords or Traj3DFromCoords. The function TrajsBuild allows you to create multiple Trajectorys by reading their coordinates from files.

Typically, trajectories require smoothing to remove high frequency noise; see TrajSmoothSG. Some methods require trajectories which have been resampled to a constant step length (rediscretized); see TrajRediscretize.

You can create a random trajectory by calling TrajGenerate.

Trajectory analysis

TrajDerivatives calculates the speed and acceleration of a trajectory (see also TrajSpeedIntervals).

Multiple algorithms for assessing straightness or tortuosity are available, see TrajDirectionalChange, TrajDirectionAutocorrelations, TrajEmax, TrajFractalDimension, TrajSinuosity, and TrajStraightness.

Other functions

Other functions provide information about trajectories, such as TrajStepLengths, TrajGetNCoords, TrajGetUnits, TrajGetTimeUnits, TrajReverse, TrajDuration, TrajMeanVelocity, or allow some manipulations of trajectories, such as TrajScale, TrajReverse, TrajTranslate, and TrajRotate.

Trajr also provides the capability to plot a Trajectory and the results of some analyses.


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