Skip to contents

[Experimental] Both the interface and function name may change in future versions.

Partitions the region based on the hexagon tiling

Input:

Usage

cv_hex(samplers, cellsize = 0.5, n_group = 3, ...)

Arguments

samplers

A sf object containing region for which partitions to be created

cellsize

hexagon cellsize, see sf::st_make_grid() description

n_group

number of cv folds

...

Passed on to fm_nonconvex_hull(), e.g. resolution Output:

Value

a partitioned sf object as required

Author

Man Ho Suen

Examples

if (interactive()) {
  bnd <- gorillas_sf$boundary
  hex_cv <- cv_hex(bnd, cellsize = 0.5, n_group = 3, resolution = 100)
  plot(hex_cv)

  chess <- cv_partition(bnd, resolution = 0.5, chess = TRUE)
  plot(chess$white)
}