crop returns a geographic subset of the input Raster* object as specified by an Extent object (or object from which an extent object can be extracted/created). Areas in the bounding box outside of the intput RasterLayer are ignored, and the Extent is aligned to the cells of the input RasterLayer.
Usage
crop(x, y, ...)
Arguments
x
A Raster* object
y
Extent object, or any object from which an Extent object can be extracted (see Details)
Objects that have a Extent object include RasterLayer, RasterStack and RasterBrick. They can also be extracted from objects descending from the Spatial class from the sp package. You can check this with the extent function. New Extent objects can be also be created with function extent and drawExtent by clicking twice on a plot.