trajr | R Documentation |
A toolkit for the statistical analysis of 2-dimensional animal trajectories.
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.
Most trajr
functions operate on a Trajectory
object.
Trajectory
s are created by calling TrajFromCoords
or
Traj3DFromCoords
. The function TrajsBuild
allows you to create multiple Trajectory
s 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
.
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 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.