Learn R Programming

trip (version 1.1-1)

tripTransform: Reproject trip objects.

Description

Projection transformation based on CRS strings in rgdal

Usage

tripTransform(x, crs, ...)

Arguments

x
trip object with projection metadata
crs
CRS object, or PROJ.4 string accepted by CRS
...
Further arguments to spTransform

Value

  • trip object, with spatial coordinates reprojected

See Also

spTransform

Examples

Run this code
d <- data.frame(x = 1:10, y = rnorm(10), tms = Sys.time() + 1:10, id = gl(2, 5))
coordinates(d) <- ~x+y

tr <- trip(d, c("tms", "id"))
proj4string(tr) <- CRS("+proj=laea +lon_0=146")

tripTransform(tr, "+proj=longlat")

Run the code above in your browser using DataLab