Function to calculate the distance d given an area size (in square kilometres) of a hexagon in a hexagonal spatial grid determining spatial resolution of spatial sampling

calculate_d(area, geom = c("tri", "hex"))

Arguments

area

Area (square kilometres) of a hexagon in a hexagonal grid. Determines the spatial resolution of the resulting spatial sample.

geom

Spatial geometry to which area is specified for. Can be one of two options: "tri" for a triangle; hex for a hexagon.

Value

A numeric value for length (kilometres) of d

Examples

# Calculate d for a triangle with an area size of 130 square kilometres calculate_d(area = 130, geom = "tri")
#> [1] 10.0037
# Calculate d for a hexagon with an area size of 260 square kilometres calculate_d(area = 260, geom = "hex")
#> [1] 10.0037