| border.grid {hero} | R Documentation |
Construct border for grid
Description
border.grid determines the border for
data on a grid. x and y must define a
regular or irregular grid. See Details.
Usage
border.grid(x, y, proj4string)
border_grid(x, y, proj4string)
borderGrid(x, y, proj4string)
BorderGrid(x, y, proj4string)
Arguments
x |
A vector or matrix of x coordinates. See Details. |
y |
A vector or matrix of y coordinates. See Details. |
proj4string |
A projection string of class
|
Details
A regular grid is defined by ascending numeric vectors
x and y. A vector x is ascending if
x[i] < x[j] for i < j.
An irregular grid is defind by ascending matrices.
A matrix x is ascending if x[i, j] < x[i, l]
for j < l and if x[i, j] < x[k, j]
and j < k.
Value
A SpatialPolygons object.
Author(s)
Joshua French
Examples
# create x and y defining square border
x = seq(min(lon), max(lon), length = 60)
y = seq(min(lat), max(lat), length = 80)
border = border.grid(x, y)
sp::plot(border)
# use lon and lat to define border of an irregular grid
border2 = border.grid(lon, lat)
sp::plot(border2)
[Package hero version 0.6 Index]