powered by
NA
Replace NA values (or another value) in SpatRaster (x) with the values of SpatRaster (y)
x
y
# S4 method for SpatRaster,SpatRaster cover(x, y, value=NA, filename="", overwrite=FALSE, wopt=list(), ...)
SpatRaster
numeric. The cell values in x to be replaced by the values in y
character. Output filename. Optional
logical. If TRUE, filename is overwritten
TRUE
filename
list. Options for writing files as in writeRaster
writeRaster
additional arguments. None implemented
# NOT RUN { r1 <- r2 <- rast(ncols=36, nrows=18) values(r1) <- 1:ncell(r1) values(r2) <- runif(ncell(r2)) r2 <- classify(r2, cbind(-Inf, 0.5, NA)) r3 <- cover(r2, r1) # }
Run the code above in your browser using DataLab