Aliases: nlayers nlayers,BasicRaster-method nlayers,Raster-method nlayers,RasterStack-method nlayers,RasterBrick-method nlayers,Spatial-method
Keywords: spatial
### ** Examples r <- raster(ncols=10, nrows=10) values(r) <- 1:ncell(r) s <- stack(r, r, r) nlayers(s)
[1] 3
s <- stack(s,s) nlayers(s)
[1] 6
s <- dropLayer(s, 2:3) nlayers(s)
[1] 4