bbox: Bounding box and extent methods for NetLogoR classes

Description Usage Arguments Value

Description

Same as bbox and extent.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## S4 method for signature 'worldNLR'
extent(x, ...)

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

.bboxCoords(coords)

## S4 method for signature 'agentMatrix'
bbox(obj)

bbox(obj) <- value

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

## S4 method for signature '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.


NetLogoR documentation built on July 10, 2021, 5:06 p.m.