Raster package internal crop raster function
.raster_crop_metadata(r_obj, ..., block = NULL, bbox = NULL)
Subset of a raster object as defined by either block or bbox parameters
raster package object to be written
additional parameters to be passed to raster package
numeric vector with names "first_col", "ncols", "first_row", "nrows".
numeric vector with names "xmin", "xmax", "ymin", "ymax".
Rolf Simoes, rolf.simoes@inpe.br