These all create a single function that can be used for either Raster or SpatRaster objects.
.NAvalueFlag(ras, NAval)
.stack(rasList)
.projectExtent(ras, crs)
asInt(ras)
isInt(ras)
reclass(ras, tab)a Raster, or SpatRaster object
the value to use as NA
a list of Raster or SpatRaster objects
passed to raster::projectRaster(..., crs = crs) and terra::project(..., y = crs)
matrix of values to reclassify. See terra::classify and raster::reclassify.
a raster with attributed NA values
a stacked raster
the projected extent
asInt returns a *Raster with values converted to integer, if they weren't already.
isInt returns a logical as per is.integer.
reclass returns a *Raster with values reclassified as per terra::classify
and raster::reclassify.