Trim (shrink) a Raster* object by removing outer rows and columns that have no data.
Or remove the whitespace before or after a string of characters.
Usage
trim(x, ...)
Arguments
x
A Raster* object or a character string
...
additional arguments. See Details.
Value
A RasterLayer or RasterBrick object (if x is a Raster* object).
A character string If x is a character string.
Details
If x is a Raster* object, the following additional arguments can be passed, to replace default values for this function
rll{
padding Integer. Number of outer rows/columns with NA values to keep; default=0
filename Output filename. Default = ''
format Character. Output file type. See writeRasterdatatype Character. Output data type; can be 'INT', 'FLT', or a complete datatype description, see dataTypeoverwrite Logical. If TRUE, "filename" will be overwritten if it exists
progress Character. "text", "window", or "" (the default, no progress bar)
}