Learn R Programming

trajectories (version 0.2-1)

cut: obtain ranges of space and time coordinates

Description

obtain ranges of space and time coordinates

Usage

# S3 method for Track
cut(x, breaks, ..., include.lowest = TRUE, touch = TRUE)
# S3 method for Tracks
cut(x, breaks, ...)
# S3 method for TracksCollection
cut(x, breaks, ...)

Arguments

x

object of class Track, Tracks or TracksCollection

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.

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.

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.

Examples

Run this code
# NOT RUN {
data(storms)
dim(storms)
dim(cut(storms, "week", touches = FALSE)) # same number of geometries
dim(cut(storms, "week")) # increase of geometries = increase of tracks
# }

Run the code above in your browser using DataLab