Mask a raster variable using another raster variable as the mask.
Arguments
- x
S4 object. The product of interest.
- ...
extra arguments.
- variable1
character. The variable to be masked.
- variable2
character. The variable to be used as a mask.
Examples
if (FALSE) {
# Define required variables
region <- Region(name = "nebraska", type = "us state",
div = c(country = "United States", state = "Nebraska"))
date <- date_seq("2002-01-01", "2002-12-31")
## MOD09GA
# Create objects
x <- new("Mod09ga", region = region, date = date)
# Apply a cloud mask on NDVI
mask(x, "ndvi", "cloudmask")
}