Same as bbox and extent.

# S4 method for worldNLR
extent(x, ...)

# S4 method for agentMatrix
extent(x, ...)

.bboxCoords(coords)

# S4 method for agentMatrix
bbox(obj)

bbox(obj) <- value

# S4 method for agentMatrix,matrix
bbox(obj) <- value

# S4 method for worldNLR
bbox(obj)

Arguments

x

Raster* or Extent object, a matrix, a bbox, or a vector of four numbers

...

Additional arguments. When x is a single number representing 'xmin', you can pass three additional numbers (xmax, ymin, ymax)

When x is a Raster* object, you can pass four additional arguments to crop the extent: r1, r2, c1, c2, representing the first and last row and column number

coords

xy coordinates for all cells, e.g., produced by raster::coordinates.

obj

object deriving from class "Spatial", or one of classes: "Line", "Lines", "Polygon" or "Polygons", or ANY, which requires obj to be an array with at least two columns

value

2x2 matrix representing the bounding box. See bbox.

Value

bbox returns a two-column matrix; the first column has the minimum, the second the maximum values; rows represent the spatial dimensions. extent returns an extent object.

two-column matrix; the first column has the minimum, the second the maximum values; rows represent the spatial dimensions. See bbox.