Create a new RasterLayer where all cells that are NA in mask are set to NA, and that has the same values as x in the other cells.
Usage
mask(x, mask, ...)
Arguments
x
A RasterLayer object
mask
A RasterLayer object
...
Additional arguments. See below, under Methods
Value
A new RasterLayer object, and in some cases the side effect of a new file on disk.
Methods
A full call to the mask method for a RasterLayer is:
mask(x, mask, filename='', ... )rll{
... Additional arguments, see Details
}
The following additional arguments can be passed, to replace default values for this function
rll{
filename character. output filename
format Character. Output file type. See writeRasterdatatype Character. Output data type. See dataTypeoverwrite Logical. If TRUE, "filename" will be overwritten if it exists
progress Character. Valid values are "text", "tcltk", "windows" (on that platform only) and ""
}