Replace missing (NA) or other values in SpatRaster x with the values of SpatRaster y. Or replace missing values in the first layer with the first value encountered in other layers.
For polygons: areas of x that overlap with y are replaced by y or, if identity=TRUE intersected with y.
methods
## S4 method for signature 'SpatRaster,SpatRaster'cover(x, y, values=NA, filename="",...)## S4 method for signature 'SpatRaster,missing'cover(x, y, values=NA, filename="",...)## S4 method for signature 'SpatVector,SpatVector'cover(x, y, identity=FALSE, expand=TRUE)
Arguments
x: SpatRaster or SpatVector
y: Same as x or missing if x is a SpatRaster
values: numeric. The cell values in x to be replaced by the values in y
filename: character. Output filename
...: additional arguments for writing files as in writeRaster
identity: logical. If TRUE overlapping areas are intersected rather than replaced
expand: logical. Should parts of y that are outside of x be included?