View source: R/hexagon_tiling.R
| cv_hex | R Documentation |
Both the interface and function name
may change in future versions.
Partitions the region based on the hexagon tiling
Input:
cv_hex(samplers, cellsize = 0.5, n_group = 3, ...)
samplers |
A sf object containing region for which partitions to be created |
cellsize |
hexagon cellsize, see |
n_group |
number of cv folds. |
... |
Passed on to |
a hexagonal partition covering the samplers object, with a group
integer variable indicating the fold assignment, 1, 2, ..., n_group.
Man Ho Suen
if (interactive()) {
bnd <- gorillas_sf$boundary
hex_cv <- cv_hex(bnd, cellsize = 2, n_group = 3, resolution = 100)
plot(hex_cv)
chess <- cv_partition(bnd, resolution = 1.5, chess = TRUE)
plot(chess$black$geometry, col = "black")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.