which.lyr | R Documentation |
This method returns a single layer SpatRaster with cell values indicating the first layer in the input that is TRUE
. All numbers that are not zero (or FALSE
), are considered to be TRUE
.
## S4 method for signature 'SpatRaster'
which.lyr(x)
x |
SpatRaster |
SpatRaster
isTRUE
, which
, See Summary-methods
for which.min
and which.max
s <- rast(system.file("ex/logo.tif", package="terra"))
x <- which.lyr(s > 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.