View source: R/trimTrajectory.R
| trimTrajectory | R Documentation |
This function trims the points of a 'trajectory' object by selecting a subset of the points from the specified 'from' to 'to' indices. It then creates a new trajectory using the selected points.
trimTrajectory(obj, from = 1, to = nrow(obj$points))
obj |
An object of class 'trajectory' that contains a component 'points', which is a data frame with the coordinates of the points in the trajectory. |
from |
A positive integer indicating the starting index of the points to include. Default is 1. |
to |
A positive integer indicating the ending index of the points to include. Default is the total number of rows in 'obj$points'. |
A new trajectory object created using the subset of points from the 'from' to 'to' indices.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.