
Last chance! 50% off unlimited learning
Sale ends in
Shift the location of a SpatRaster or SpatVector object
# S4 method for SpatRaster
shift(x, dx=0, dy=0, filename="", overwrite=FALSE, wopt=list(), ...)
SpatRaster or SpatVector
numeric. The shift in horizontal direction
numeric. The shift in vertical direction
character. Output filename. Optional
logical. If TRUE
, filename
is overwritten
list. Options for writing files as in writeRaster
additional arguments. None implemented
Same object type as x
# NOT RUN {
r <- rast(xmn=0, ymn=0, xmx=1, ymx=1)
r <- shift(r, dx=1, dy=-1)
# }
Run the code above in your browser using DataLab