Learn R Programming

raster (version 3.6-30)

Extreme coordinates: Coordinates of the Extent of a Raster object

Description

These functions return or set the extreme coordinates of a Raster* object; and return them for Spatial* objects.

Usage

xmin(x)
xmax(x)
ymin(x)
ymax(x)

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

Value

numeric

Arguments

x

Raster* or Extent object

value

numeric. x or y coordinate

...

additional arguments. None implemented

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