shift {raster} | R Documentation |
Shift the location of a Raster* of vector type Spatial* object in the x and/or y direction
## S4 method for signature 'Raster' shift(object, x=0, y=0, filename='', ...) ## S4 method for signature 'SpatialPolygons' shift(object, x=0, y=0, ...) ## S4 method for signature 'SpatialLines' shift(object, x=0, y=0, ...) ## S4 method for signature 'SpatialPoints' shift(object, x=0, y=0, ...)
object |
Raster* or Spatial* object |
x |
numeric. The shift in horizontal direction |
y |
numeric. The shift in vertical direction |
filename |
character file name (optional) |
... |
if |
Same object type as x
flip
, rotate
, and the elide function in the maptools package
r <- raster() r <- shift(r, x=1, y=-1)