remap {pRecipe} | R Documentation |
Spatial aggregation
Description
The function remap
aggregates data into a new grid resolution.
Usage
remap(x, y)
## S4 method for signature 'Raster'
remap(x, y)
## S4 method for signature 'data.table'
remap(x, y)
## S4 method for signature 'character'
remap(x, y)
Arguments
x |
Raster* object; data.table (see details); filename (character, see details) |
y |
numeric |
Details
If 'x' is a data.table, its columns should be named: "lon", "lat", "date", and "value"
If 'x' is a filename, it should point to a *.nc file.
Value
Raster* object; data.table
Examples
## Not run:
download_data("gldas-vic", tempdir(), timestep = "yearly")
r <- raster::brick(paste0(tempdir(),
"/gldas-vic_tp_mm_land_194801_201412_025_yearly.nc"))
s <- remap(r, 1)
## End(Not run)
[Package pRecipe version 3.0.1-3 Index]