trxgarnish: Track garnisher for time and position measures

Description Usage Arguments Details Value


Computes distance from centre, quadrant edge and quadrant identity. Frame-by-frame variables are computed (frame-by frame speed (step), angular velocity (yaw) and change in theta (spin)). and also used for some quality control (eliminate unrealistic speeds). For movement calculated over different lags, see flymoves).


trxgarnish(explist, t = NULL, filter = TRUE, jump = 40)



a track data frame or experiment list (containing a trx data frame element)


an optional time protocol data frame. It must have a time and an id column which must match equivalent columns in the track data frame.


If a time protocol is available, it also includes protocol structure information and calculates quadrant preference (assuming quandrant patterns in sections 4 and 5 only).

Input can be either a trx data frame or an experiment list containing a trx data frame and an exp list of experimental parameters. In the latter case some info is added to the list, namely the arena parameters (in $exp$arena) and, if passed separately, time protocol ($t).

A time protocol can be passed to the function as an optional var or included in the original list as an element named $t. It is merged into the track data frame by id and time. If the time protocol contains a section column, this is combined with quadrant information to compute preference for lit quadrant (assumed to be positive diagonal for section 4 and negative diagonal for section 5).


A garnished track data frame or experiment list (depending on the format in input) including the columns radius, edge, distance and quadrant, and the first and second derivative variables step, yaw and spin; if there is a time protocol, also includes all columns of that data frame and the preference column calculated for the appropriate protocol section.

PaolaCognigni/CTraxHelper documentation built on May 7, 2019, 11:57 p.m.