ang_speed | R Documentation |
Given a set of locations defining a trajectory, this function approximates their instantaneous instantaneous angular speeds computed as the difference between successive headings divided by the time between these successive headings.
ang_speed(x, y, t, geo = FALSE)
angSpeed(x, y, t, geo = FALSE)
x |
A vector of x (or longitude) coordinates corresponding to a single trajectory. |
y |
A vector of y (or latitude) coordinates corresponding to a single trajectory. |
t |
A vector of timestamps corresponding to a single trajectory. |
geo |
A logical value indicating whether the locations are defined by geographic coordinates (pairs of longitude/latitude values). Default: FALSE. |
A vector of the same length as x, y and t corresponding to the approximated instantaneous angular speeds along the trajectory.
Simon Garnier, garnier@njit.edu
heading
, ang_acc
x <- rnorm(25)
y <- rnorm(25, sd = 3)
t <- as.POSIXct(1:25, origin = Sys.time())
ang_speed(x, y, t)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.