Set a particular value of a SpatRaster to NA. If the values are in memory the change is made immediately. If the values are on disk, the changes is only made for values read from the file ("lazy evaluation").
Usage
# S4 method for SpatRaster
NAflag(x)
# S4 method for SpatRaster
NAflag(x)<-value
Arguments
x
SpatRaster
value
numeric. The value to be interpreted as NA; set this before reading the values from the file. This can be a single value, or multiple values, one for each data source (file / subdataset)