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))A new trajectory object created using the subset of points from the `from` to `to` indices.
An object of class `trajectory` that contains a component `points`, which is a data frame with the coordinates of the points in the trajectory.
A positive integer indicating the starting index of the points to include. Default is 1.
A positive integer indicating the ending index of the points to include. Default is the total number of rows in `obj$points`.