sinuosity | R Documentation |
Given a set of successive step lengths and turning angles, this function computes he sinuosity of a trajectory as defined by Benhamou (2004), equation 8. This is a corrected version of the sinuosity index defined in Bovet & Benhamou (1988), which is suitable for a wider range of turning angle distributions, and does not require a constant step length.
sinuosity(step_lengths, turning_angles)
step_lengths |
A vector of step lengths as calculated by
|
turning_angles |
A vector of turning angles as calculated by
|
A single numeric value corresponding to the sinuosity of the trajectory.
Simon Garnier, garnier@njit.edu
Benhamou, S. (2004). How to reliably estimate the tortuosity of an animal’s path: straightness, sinuosity, or fractal dimension? Journal of Theoretical Biology, 229(2), 209–220. https://doi.org/10.1016/j.jtbi.2004.03.016
Bovet, P., & Benhamou, S. (1988). Spatial analysis of animals’ movements using a correlated random walk model. Journal of Theoretical Biology, 131(4), 419–433. https://doi.org/10.1016/S0022-5193(88)80038-9
linear_dist
, ang_speed
x <- rnorm(25)
y <- rnorm(25, sd = 3)
t <- as.POSIXct(1:25, origin = Sys.time())
step_lengths <- linear_dist(x, y)
turning_angles <- ang_speed(x, y, t)
sinuosity(step_lengths, turning_angles)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.