gridCells {secr} | R Documentation |
Forms grid cells centred on input points.
gridCells(x, cellsize = spacing(x), crs = NA)
x |
matrix or dataframe with x- and y-coordinates |
cellsize |
length of gridcell side |
crs |
crs description suitable for |
The argument x will often be a traps or mask object with spacing attribute. Otherwise cellsize
must be provided.
See make.grid
for jittered locations within grid cells.
A simple features (sf) object of class ‘sfc_MULTIPOLYGON’.
crs
may be the integer EPSG code (e.g. 3578 Yukon Albers).
plot(gridCells(traps(captdata)))
plot(traps(captdata), add = TRUE)