Description Usage Arguments Details Value See Also Examples
This function creates a grid for prediction.
1 2  mkpredgrid2d(pnts.x, pnts.y, par.x, par.y, isby = FALSE, chull = FALSE,
exf = 1)

pnts.x 
x coordinate of the domain. Could also be a twocolumn matrix containing the x and y coordinates 
pnts.y 
y coordinate of the domain. Should be
omitted or set to 
par.x 
A scalar parameter for the x component of the new
grid. This parameter corresponds to either the 
par.y 
As in 
isby 
If 
chull 
Whether to calculate the convex hull of the points.
Set this to 
exf 
An expansion factor of the convex hull of

If chull
this function first calculates the convex hull of
the points. If exf
is not 1 the borders are expanded. Then
the function calls point.in.polygon
to select
points that fall inside the borders.
A list with components
grid
A twocolumn matrix with the prediction grid.
xycoord
A list with components "x" and "y"
containing the sequence of points used to create the grid.
xygrid
A matrix with the full square grid derived
from xycoord
.
borders
The (expanded) borders of the domain.
inxygrid
A logical vector indicating which rows of
xycoord
fall inside borders
, and therefore
correspond to the grid
.
1 2 3 4 5 6 7 8 9  ## Not run:
data(rhizoctonia)
predgrid < mkpredgrid2d(rhizoctonia[c("Xcoord", "Ycoord")],
par.x = 100, chull = TRUE, exf = 1.2)
plot(predgrid$borders, type = "l") # Domain for prediction
points(predgrid$grid, pch = 20, cex = .3) # Prediction locations
points(rhizoctonia[c("Xcoord", "Ycoord")]) # Observed locations
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.