Learn R Programming

amt (version 0.1.7)

as_track: Coerce to track

Description

Coerce other classes (currently implemented: SpatialPoints) to a track_xy.

Usage

as_track(x, ...)

# S3 method for SpatialPoints as_track(x, ...)

# S3 method for sfc_POINT as_track(x, ...)

# S3 method for steps_xyt as_track(x, ...)

# S3 method for data.frame as_track(x, ...)

Value

An object of class track_xy(t)

Arguments

x

Object to be converted to a track.

...

Further arguments, none implemented.

Examples

Run this code
xy <- sp::SpatialPoints(cbind(c(1, 3, 2, 1), c(3, 2, 2, 1)))
as_track(xy)

Run the code above in your browser using DataLab