pred_grid | R Documentation |
This function facilitates the generation of a 2D prediction grid for geostatistical kriging.
pred_grid(coords, y.coords = NULL, ..., y.by = NULL,
y.length.out = NULL, y.along.with = NULL)
coords |
a list, matrix or data-frame with xy-coordinates of prediction points or a vector with x-coordinates. |
y.coords |
a vector with y-coordinates. Needed if
argument |
... |
arguments |
y.by |
Optional. |
y.length.out |
Optional. |
y.along.with |
Optional. |
An two column data-frame which is on output of expand.grid
.
See seq
and expand.grid
which are
used internally and locations.inside
and
polygrid
to select points inside a border.
pred_grid(c(0,1), c(0,1), by=0.25) ## create a grid in a unit square
loc0 <- pred_grid(ca20$borders, by=20)
points(ca20)
points(loc0, pch="+")
points(locations.inside(loc0, ca20$border), pch="+", col=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.