Learn R Programming

trip (version 1.10.0)

rasterize: Rasterize trip objects based on line-segment attributes.

Description

Trip rasterize.

Value

RasterLayer

Arguments

x

trip object

y

Raster* object

field

attribute from which differences will be calculated, defaults to the time-stamp between trip locations

Examples

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

tr$temp <- sort(runif(nrow(tr)))
r <- rasterize(tr)

rasterize(tr, grid = r)
# \donttest{
rasterize(tr, r, field = "temp")
rasterize(tr, method = "density")
rasterize(tr, method = "density", grid = r)

rasterize(tr, r, field = "tms")
rasterize(tr, r)

# }

Run the code above in your browser using DataLab