grid_offset {tidysdm} | R Documentation |
Get default grid cellsize for a given dataset
Description
This function facilitates using spatialsample::spatial_block_cv multiple
times in an analysis. spatialsample::spatial_block_cv creates a grid based
on the object in data
. However, if spatial blocks are generated multiple
times in an analysis (e.g. for a spatial_initial_split()
, and then
subsequently for cross-validation on the training dataset), it might be
desirable to keep the same grid). By applying this function to the largest
dataset, usually the full dataset before spatial_initial_split()
. The
resulting cellsize can be used as an option in
spatialsample::spatial_block_cv.
Usage
grid_offset(data)
Arguments
data |
a sf::sf dataset used to size the grid |
Value
the grid offset
[Package tidysdm version 1.0.0 Index]