Create a new SpatRaster that has the same values as SpatRaster x, except for the cells that are NA (or another maskvalue in another SpatRaster (the 'mask') or not covered by the objects of a SpatVector. These cells become NA (or another updatevalue).
logical. If TRUE, areas on mask that are _not_ the maskvalue are masked
maskvalue
numeric. The value in mask that indicates the cells of x that should become updatevalue (default = NA)
updatevalue
numeric. The value that cells of x should become if they are not covered by mask (and not NA)
touches
logical. If TRUE, all cells touched by lines or polygons will be masked, not just those on the line render path, or whose center point is within the polygon