stack,RasterList-method {rasterList} | R Documentation |
Creates a RasterStack-class
object from a RasterList-class
Description
The method transforms a RasterList-class
into a RasterStack-class
in case of the list elements are numeric vectors.
Usage
## S4 method for signature 'RasterList'
stack(x, ...)
Arguments
x |
a |
... |
further arguments for |
Value
a RasterStack-class
object
See Also
Examples
f <- system.file("external/test.grd", package="raster")
## Creates a simple generic RasterList
rl <- rasterList(f)
list <- as.list(as.vector(rl))
list <- lapply(X=list,FUN=function (x) {c(x,x+10,x+15)})
rl <- rasterList(rl,list=list,object.name="test")
ss <- stack(rl)
il <- 8331
list[[il]] <- numeric(0)
rla <- rasterList(rl,list=list,object.name="test2")
sa <- stack(rla)
[Package rasterList version 0.5.20 Index]