crop-RasterArray-method: Crop a RasterArray object

Description Usage Arguments Value Examples

Description

The method is inherited from the RasterStack class.

Usage

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

Arguments

x

a RasterArray class object.

y

an xtent 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(dems)
# crop to Australia
ext <- extent(c(                
  xmin = 106.58,
  xmax = 157.82,
  ymin = -45.23,
  ymax = 1.14 
)) 
# cropping all DEMS (Australia drifted in)
au<- crop(dems, ext)

chronosphere documentation built on April 19, 2021, 1:07 a.m.