These are shorthand methods that call other methods that should normally be used, such as
object[i] can be used to access values of a Raster* object, using cell numbers. You can also use row and column numbers as index, using
object[,j]. In addition you can supply an Extent, SpatialPolygons, SpatialLines or SpatialPoints object.
drop=TRUE (the default) cell values are returned (a vector for a RasterLayer, a matrix for a RasterStack or RasterBrick). If
drop=FALSE a Raster* object is returned that has the extent covering the requested cells, and with all other non-requested cells within this extent set to
If you supply a RasterLayer, its values will be used as logical (TRUE/FALSE) indices if both Raster objects have the same extent and resolution; otherwise the cell values within the extent of the RasterLayer are returned.
Double brackes '[[ ]]' can be used to extract one or more layers from a multi-layer object.
| ||a Raster* object|
| ||cell number(s), row number(s), a (logical) RasterLayer, Spatial* object|
| ||column number(s) (only available if i is (are) a row number(s))|
| || If
1 2 3 4 5 6 7 8 9 10 11 12
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.