Which returns a RasterLayer with TRUE or FALSE. Cells with 1 are set to TRUE, all other cells, including NA are set to FALSE
Usage
Which(x, ...)
Arguments
x
A RasterLayer object or a logical expression resulting in a RasterLayer object
...
Additional arguments. See Details
Value
a RasterLayer object
Details
You can use the additional logical argument cells. If cells=FALSE (the default), a (logical) RasterLayer is returned, if cells=TRUE, the cell numbers are returned for which the condition is TRUE