as.logical {raster} | R Documentation |
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.
r <- raster(nrow=10, ncol=10) r[] <- round(runif(ncell(r))) r <- as.logical(r)