View source: R/reverseTrajectory.R
| reverseTrajectory | R Documentation |
This function reverses the order of the points in an object of class 'trajectory' and then constructs a new trajectory using the reversed points. The function assumes the existence of a 'trajectory' function that creates a trajectory from the given x and y coordinates, as well as a time step 'delta_time'.
reverseTrajectory(obj)
obj |
An object of class 'trajectory' that contains a component 'points', which is a matrix or data frame with the coordinates of the points. It is assumed that 'points' has columns 'x' and 'y' representing the coordinates of the points in the trajectory. |
A new trajectory object created using the reversed points and the original 'delta_time' from 'obj'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.