as.logical {raster}R Documentation

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.

See Also

as.logical

Examples

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

[Package raster version 2.5-2 Index]