| border.grid | R Documentation |
border.grid determines the border for
data on a grid. x and y must define a
regular or irregular grid. See Details.
border.grid(x, y, proj4string)
border_grid(x, y, proj4string)
borderGrid(x, y, proj4string)
BorderGrid(x, y, proj4string)
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
|
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.
A SpatialPolygons object.
Joshua French
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.