resolution

0th

Percentile

Resolution

Get (or set) the x and/or y resolution of a Raster* object

Keywords
spatial
Usage
xres(x)
yres(x)
res(x)
res(x) <- value
Arguments
x

Raster* object

value

Resolution (single number or vector of two numbers)

Value

A single numeric value or two numeric values.

See Also

extent, ncell

Aliases
  • xres
  • yres
  • res
  • xres,BasicRaster-method
  • yres,BasicRaster-method
  • res,BasicRaster-method
  • res<-
Examples
# NOT RUN {
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)


# }
Documentation reproduced from package raster, version 2.5-8, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.