Grid-based spatial sampling
sample_grid(
coordinates,
n_target,
grid_size,
min_cells_per_region,
balance_regions,
verbose = TRUE
)Spatial coordinates
Number of neighbours
Grid size
Mimimum cells per region
Balance regions
Whether to report progress with message()
Integer vector of the selected cell indices.