50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

raster (version 1.6-22)

as.logical: Change values to logical

Description

Change values of a Raster* object to logical values (zero becomes FALSE, all other values become TRUE) You can provide the standard additional arguments: filename, format, overwrite, and progress.

Arguments

See Also

as.logical

Examples

Run this code
r <- raster(nrow=10, ncol=10)
r[] <- round(runif(ncell(r)))
r <- as.logical(r)

Run the code above in your browser using DataLab