Learn R Programming

lulcc (version 1.0.4)

resample,ExpVarRasterList,Raster-method: Resample maps in ExpVarRasterList object or list

Description

A wrapper function for raster::resample to resample raster objects in an ExpVarRasterList object or list.

Usage

# S4 method for ExpVarRasterList,Raster
resample(x, y, method = "ngb", ...)

# S4 method for list,Raster resample(x, y, method = "ngb", ...)

Arguments

x

an ExpVarRasterList object or list of Raster* maps to be resampled

y

Raster* object with parameters that x should be resampled to

method

method used to compute values for the new RasterLayer, should be "bilinear" for bilinear interpolation, or "ngb" for nearest neighbour

additional arguments to raster::resample

Value

An ExpVarRasterList object or list, depending on x.

See Also

ExpVarRasterList, raster::resample

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
## Plum Island Ecosystems

## observed data
obs <- ObsLulcRasterStack(x=pie,
                    pattern="lu",
                    categories=c(1,2,3),
                    labels=c("forest","built","other"),
                    t=c(0,6,14))

## explanatory variables
ef <- ExpVarRasterList(x=pie, pattern="ef")

## resample to ensure maps have same characteristics as observed maps
ef <- resample(x=ef, y=obs, method="ngb")

# }

Run the code above in your browser using DataLab