crop: Cropping a "RasterArray"-class object

cropR Documentation

Cropping a 'RasterArray'-class object

Description

The method is inherited from the 'SpatRaster' class.

Usage

## S4 method for signature 'RasterArray'
crop(x, y, ...)

Arguments

x

a RasterArray class object.

y

an SpatExtent-class object, or any object from which an extent object can be extracted (see Details)

...

arguments passed to the crop function.

Value

A cropped RasterArray-class object.

Examples

ex <- rastex()
# crop to a specific area
if(requireNamespace("terra", quietly=TRUE)){
 ext <- terra::ext(c(                
   xmin = 106.58,
   xmax = 157.82,
   ymin = -45.23,
   ymax = 1.14 
 )) 
 # cropping all 
 au<- crop(ex, ext)
}


via documentation built on May 31, 2023, 8:31 p.m.

Related to crop in via...