Last chance! 50% off unlimited learning
Sale ends in
## S3 method for class 'character':
stack(x, ..., bands=NULL, varname="", native=FALSE, RAT=TRUE, quick=FALSE)
## S3 method for class 'Raster':
stack(x, ...)
## S3 method for class 'missing':
stack(x)
## S3 method for class 'list':
stack(x, bands=NULL, native=FALSE, RAT=TRUE, ...)
x
is a list, additional arguments ...
are ignoredTRUE
native drivers are used instead of gdal drivers (where available, such as for BIL and Arc-ASCII files)TRUE
a raster attribute table is created for files that have oneTRUE
the extent and resolution of the objects are not compared. This speeds up the creation of the RasteStack but should be use with great caution. Only use this option when you are absolutely sure that all the data in all the filraster
addLayer, dropLayer, raster, brick
# file with one layer
fn <- system.file("external/test.grd", package="raster")
s <- stack(fn, fn)
r <- raster(fn)
s <- stack(r, fn)
nlayers(s)
# file with three layers
slogo <- stack(system.file("external/rlogo.grd", package="raster"))
nlayers(slogo)
slogo
Run the code above in your browser using DataLab