Last chance! 50% off unlimited learning
Sale ends in
This method returns a single layer SpatRaster with cell values indicating the 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 SpatRaster
which.lyr(x)
SpatRaster
SpatRaster
s <- rast(system.file("ex/logo.tif", package="terra"))
x <- which.lyr(s > 100)
Run the code above in your browser using DataLab