Description Usage Arguments Details Value
Calculates the speed (scalar) in px/frame by comparing centroid location across framelag
.
1 | flyrun(trx, framelag = 6)
|
trx |
a track data frame (only requires CTrax output variables) |
framelag |
the number of frames to derive speed across; defaults to 6 |
For each timepoint t the velocity vector is calculated between t-framelag/2
and t+framelag+2
.
Currently this leaves framelag/2 NA
s at the beginning and end of each track. This causes all sorts of problems
and may be best addressed somehow in the future.
Frames with speed
>50 are also currently NA
'd since that is exclusively artifacts (CTrax already limits jumps to 40 px/frame)
however this again causes holes in the data which become problematic later. Ideally the imputation would be done at the x
and y
level.
A numeric vector matching the structure of trx
containing the speed value for each object and timepoint, or NA
s when it can't be calculated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.