nlayers | R Documentation |
Get the number of layers in a Raster* object, typically used with a (multilayer) RasterStack or RasterBrick object
nlayers(x)
x |
Raster* object |
integer
names
r <- raster(ncols=10, nrows=10)
values(r) <- 1:ncell(r)
s <- stack(r, r, r)
nlayers(s)
s <- stack(s,s)
nlayers(s)
s <- dropLayer(s, 2:3)
nlayers(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.