NA
values in the first Raster object (x
) with the values of the second (y
), and so forth for additional Rasters. If x
has mutliple layers, the subsequent Raster objects should have the same number of layers, or have a single layer only (which will be recycled).cover(x, y, ...)
writeRaster
r1 <- raster(ncols=36, nrows=18)
r1[] <- 1:ncell(r1)
r2 <- setValues(r1, runif(ncell(r1)))
r2[r2<0.5] <- NA
r3 <- cover(r2, r1)
Run the code above in your browser using DataLab