Learn R Programming

rasterList (version 0.5.20)

raster,RasterList-method: Raster methods for a RasterList-class object.

Description

Raster methods for a RasterList-class object.

Usage

# S4 method for RasterList
raster(x, FUN = NULL, ...)

Value

a RasterLayer-class object

Arguments

x

a valid RasterList-class object

FUN

if it not NULL a function is applied to all elements of the list slot in x.

...

further arguments

See Also

stack,RasterListApply

Examples

Run this code

f <- system.file("external/test.grd", package="raster")
ur <- rasterList(raster(f),FUN=function(x,d){x+0:d},d=10)

r1 <- raster(ur)
r2 <- raster(ur,FUN=function(x){x[2]})

Run the code above in your browser using DataLab