shift

0th

Percentile

Shift

Shift the location of a Raster* of vector type Spatial* object in the x and/or y direction

Keywords
spatial
Usage
# S4 method for Raster
shift(object, x=0, y=0, filename='', ...)

# S4 method for SpatialPolygons shift(object, x=0, y=0, ...)

# S4 method for SpatialLines shift(object, x=0, y=0, ...)

# S4 method for SpatialPoints shift(object, x=0, y=0, ...)

Arguments
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 object is a Raster* object: additional arguments as for writeRaster

Value

Same object type as x

See Also

flip, rotate, and the elide function in the maptools package

Aliases
  • shift
  • shift,Raster-method
  • shift,SpatialPolygons-method
  • shift,SpatialLines-method
  • shift,SpatialPoints-method
Examples
# NOT RUN {
r <- raster()
r <- shift(r, x=1, y=-1)
# }
Documentation reproduced from package raster, version 2.9-5, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.