cut {trajectories} | R Documentation |
obtain ranges of space and time coordinates
Description
obtain ranges of space and time coordinates
Usage
## S3 method for class 'Track'
cut(x, breaks, ..., include.lowest = TRUE, touch = TRUE)
## S3 method for class 'Tracks'
cut(x, breaks, ...)
## S3 method for class 'TracksCollection'
cut(x, breaks, ...)
Arguments
x |
object of class |
breaks |
define the breaks; see cut |
... |
passed down to Tracks and Track methods, then to cut |
include.lowest |
see cut |
touch |
logical; if FALSE, Track objects will be formed from unique sets of points, meaning that gaps between two consecutive Track objects will arise; if FALSE, the first point from each next track is copied, meaning that sets of Track are seamless. |
Details
sub-trajectories can be invalid, if they have only one point, and are ignored. This
can happen at the start only if touch=FALSE
, and at the end in any case.
Value
The cut
method applied to a Track
object cuts the track in pieces, and
hence returns a Tracks
object. cut.Tracks
returns a Tracks
object,
cut.TracksCollection
returns a TracksCollection
.
Examples
# example might take too long for CRAN checks
data(storms)
dim(storms)
dim(cut(storms, "week", touches = FALSE)) # same number of geometries
dim(cut(storms, "week")) # increase of geometries = increase of tracks