stackSelect | R Documentation |
Use a Raster* object to select cell values from different layers in a multi-layer Raster* object. The object to select values y
should have values between 1
and nlayers(x)
. The values of y
are rounded.
See extract
for extraction of values by cell, point, or otherwise.
## S4 method for signature 'RasterStackBrick,Raster'
stackSelect(x, y, recycle=FALSE, type='index', filename='', ...)
x |
RasterStack or RasterBrick object |
y |
Raster* object |
recycle |
Logical. Recursively select values (default = |
type |
Character. Only relevant when |
filename |
Character. Output filename (optional) |
... |
Additional arguments as for |
Raster* object
stackApply
, extract
r <- raster(ncol=10, nrow=10, vals=1)
s <- stack(r, r+2, r+5)
values(r) <- round((runif(ncell(r)))*3)
x <- stackSelect(s, r)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.