Description Usage Arguments Value
View source: R/Calculate_mvt.R
The function takes the X- and Y-coordinates for each unqiue trajectory and calculates movement metrics such as the gross and net displacement, absolute and relative angles and duration
1 | calculate_mvt(data, to.data, trajectory.data.folder, pixel_to_scale, fps)
|
data |
dataframe containing the X- and Y-coordinates, the frame and the trajectory ID |
to.data |
path to the working directory |
trajectory.data.folder |
directory where the data is saved |
pixel_to_scale |
specify how a pixel scales to real dimensions |
fps |
specify the frame rate of the video |
returns a data.table with the movement metrics for each fix appended to the original data (NB: movement metrics often need two (e.g. step length), sometimes even three (e.g., turning angles) fixes; fixes for which metrics cannot be calculated are padded with NA). The movement parameters are the step length, the step duration, the step speed (step length/step duration), the gross displacement as the cumulative sum of the step lengths, the net displacement between the first fix of a given trajectory and the current fix and finally the relative angle (turning angle) and absolute angle (in radians). For details on these metrics, please refer to a dedicated textbook (e.g. Turch (1998): Quantitative Analysis of Movement: Measuring and Modeling Population Redistribution in Animals and Plants, Sinauer Associates, Sunderland).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.