which: Which cells are TRUE?

Description Usage Arguments Value See Also Examples

Description

This method returns a single layer SpatRaster with cell values that are the first layer in the input that has the value is not zero (FALSE), and, hence, is TRUE.

Usage

1
2
## S4 method for signature 'SpatRaster'
which.lyr(x)

Arguments

x

SpatRaster

Value

SpatRaster

See Also

isTRUE, which, See Summary-methods for which.min and which.max

Examples

1
2
s <- rast(system.file("ex/logo.tif", package="terra"))   
x <- which.lyr(s > 100)

terra documentation built on Oct. 11, 2021, 9:09 a.m.