raster (version 1.0.4)

coordinates: Coordinates

Description

These functions return or set the extreme coordinates of a Raster* object.

Usage

xmin(object)
xmax(object)
ymin(object)
ymax(object)

xmin(x) <- value
xmax(x) <- value
ymin(x) <- value
ymax(x) <- value

Arguments

object
A Raster* object
x
A Raster* object
value
A new x or y coordinate

Value

  • a single number

See Also

extent, dimensions

Examples

Run this code
r <- raster(xmn=-0.5, xmx = 9.5, ncols=10)
xmin(r)
xmax(r)
ymin(r)
ymax(r)
xmin(r) <- -180
xmax(r) <- 180

Run the code above in your browser using DataLab