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 48 49 50 51 52 53 54
|
\name{resolution}
\alias{xres}
\alias{yres}
\alias{res}
\alias{xres,BasicRaster-method}
\alias{yres,BasicRaster-method}
\alias{res,BasicRaster-method}
\alias{res<-}
\alias{res<-,BasicRaster-method}
\title{Resolution}
\description{
Get (or set) the x and/or y resolution of a Raster* object
}
\usage{
xres(x)
yres(x)
res(x)
res(x) <- value
}
\arguments{
\item{x}{Raster* object}
\item{value}{Resolution (single number or vector of two numbers) }
}
\value{
A single numeric value or two numeric values.
}
\seealso{ \code{\link[raster]{extent}}, \code{\link[raster]{ncell}} }
\examples{
r <- raster(ncol=18, nrow=18)
xres(r)
yres(r)
res(r)
res(r) <- 1/120
# set yres differently
res(r) <- c(1/120, 1/60)
}
\keyword{spatial}
|