not.na.RdShortcut method to avoid the two-step !is.na(x)
# S4 method for class 'SpatRaster'
not.na(x, falseNA=FALSE, filename="", ...)SpatRaster
logical. If TRUE, the output cell values are either TRUE, for cells that are not NA in x, or NA for the cells that are NA in x. Otherwise, the output values are either TRUE or FALSE
character. Output filename
additional arguments for writing files as in writeRaster
SpatRaster