K-means based spatial sampling
sample_kmeans(
coordinates,
n_target,
min_cells_per_region,
balance_regions,
verbose = TRUE
)Spatial coordinates
Number of targets
Minimum cells per region
Balance regions
Whether to report progress with message()
Integer vector of the selected cell indices.