File: shift.Rd

package info (click to toggle)
r-cran-raster 3.6-31-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,300 kB
  • sloc: cpp: 2,367; ansic: 1,572; sh: 13; makefile: 2
file content (47 lines) | stat: -rw-r--r-- 1,073 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
\name{shift}

\docType{methods}

\alias{shift}
\alias{shift,Raster-method}
\alias{shift,SpatialPolygons-method}
\alias{shift,SpatialLines-method}
\alias{shift,SpatialPoints-method}
  
\title{Shift}

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

\usage{
\S4method{shift}{Raster}(x, dx=0, dy=0, filename='', ...)

\S4method{shift}{SpatialPolygons}(x, dx=0, dy=0,  ...)

\S4method{shift}{SpatialLines}(x, dx=0, dy=0,  ...)

\S4method{shift}{SpatialPoints}(x, dx=0, dy=0,  ...)
}

\arguments{
  \item{x}{Raster* or Spatial* object}
  \item{dx}{numeric. The shift in horizontal direction}
  \item{dy}{numeric. The shift in vertical direction}
  \item{filename}{character file name (optional)}
  \item{...}{if \code{x} is a Raster* object: additional arguments as for \code{\link{writeRaster}} } 
}
 
\value{
Same object type as \code{x}
}


\seealso{ \code{\link{flip}}, \code{\link{rotate}}, and the elide function in the maptools package }

\examples{
r <- raster()
r <- shift(r, dx=1, dy=-1)
}

\keyword{spatial}