safemoves: Track motion parameter calculator

Description Usage Arguments Details Value

View source: R/safemoves.R

Description

A wrapper function that calls flyrun, flyangle and flyturn and appends them to a track data frame, then removes any entry containing even one NA. Used for follow-up analysis that can't handle NAs.

Usage

1
safemoves(trx, speedlag = 6, anglelag = 6, turnlag = 6)

Arguments

trx

a track data frame (CTrax values)

speedlag

frame lag for the calculation of speed

anglelag

frame lag for the calculation of the velocity vector angle

turnlag

frame lag for the calculation of the angular velocity

Details

Each motion function can receive a specific framelag value; by default they are all at 6. This function is kept separate from trxgarnish so that it can be run with different framelag parameters without recalculating all the location variables as well.

Value

A track data frame including the columns speed, angle and turn. Every NA entry will be removed. The overwhelming majority of these will be framelag chunks at the beginning and end of tracks (where speed can't be calculated because of lack of hindsight information) which don't affect the data structure much, but some would be artefactual entries culled by the speed>50 or radius<400 sanity check. These could leave holes in the middle of tracks whereby consecutive rows would not be consecutive frames.


PaolaCognigni/CTraxHelper documentation built on Sept. 23, 2017, 10:54 a.m.