Convert x,y nodes to data.frame of polygons
Usage
grid2df(
spe,
x = spe@metadata$grid_density$node_x,
y = spe@metadata$grid_density$node_y,
reverseY = FALSE,
...
)
Arguments
- spe
A SpatialExperiment object with grid density calculated
- x
vector of x nodes of the polygons
- y
vector of y nodes of the polygons
- reverseY
Reverse y coordinates. Can be numeric to specify the value to subtract y coordinates from (reverseY - y coords).
- ...
other elements to be stored as columns of the data.frame. Each one must be a vector same length as x.