Trim (shrink) a SpatRaster by removing outer rows and columns that are
NA or another value.
# S4 method for SpatRaster trim(x, padding=0, value=NA, filename="", ...)
integer. Number of outer rows/columns to keep
numeric. The value of outer rows or columns that are to be removed
character. Output filename
additional arguments for writing files as in