makegrid {gstat} | R Documentation |
make regular grid with square cells and round numbers
makegrid(x, y, n=10000, nsig=2, margin=1.05, cell.size)
x |
x-coordinate |
y |
y-coordinate |
n |
approximate number of cells in grid |
nsig |
number of significant digits to which cell size and origin are rounded |
margin |
margin around the x and y coordinate limits |
cell.size |
cell size; if missing, a reasonable, and rounded, estimate is made |
data frame with the following elements:
x |
x-coordinates |
y |
y-coordinate |
see also spsample
methods in package sp
; the better code
is there
data(meuse) grd <- makegrid(meuse$x, meuse$y, 1000) diff(grd$x) diff(grd$y) summary(grd) grd <- makegrid(meuse$x, meuse$y, cell.size = 40) diff(grd$x) diff(grd$y) summary(grd)