gridData {nodiv} | R Documentation |
Apply a grid (2D bins) to nodiv objects of type 'points'
Description
Takes an object of type distrib_data
or nodiv_data
, and puts the point distributions on a grid. Can also be used for resampling grid data at a coarser scale. If the comm matrix has abundances (any one value larger than 1), they are summed across points in the grid cell.
Usage
gridData(dist_data, cellsize_x = 1, cellsize_y = cellsize_x, xll_corner, yll_corner)
Arguments
dist_data |
An object of type |
cellsize_x |
The size of the bins along the X (longitudinal) axis, in units of the spatial coordinates of the original points |
cellsize_y |
The size of the bins along the Y (latitudinal) axis, in units of the spatial coordinates of the original points |
xll_corner |
The x coordinate of the lower left corner of the lower left grid cell of the intended grid. The corner must be left of all points in the data set |
yll_corner |
The y coordinate of the lower left corner of the lower left grid cell of the intended grid. The corner must be below all points in the data set |
Value
The return value is the original dist_data
object with gridded distribution data
Author(s)
Michael Krabbe Borregaard
See Also
distrib_data
, ~~~
Examples
## Not run:
data(coquettes)
new <- gridData(coquettes, 2)
plot_richness(new)
## End(Not run)