calculate_d: Function to calculate the distance 'd' given an area size (in...

Description Usage Arguments Value Author(s) Examples

View source: R/calculate_d.R

Description

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

Usage

1
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

Author(s)

Ernest Guevarra based on equations by Mark Myatt

Examples

1
2
3
4
5
# Calculate d for a triangle with an area size of 130 square kilometres
calculate_d(area = 130, geom = "tri")

# Calculate d for a hexagon with an area size of 260 square kilometres
calculate_d(area = 260, geom = "hex")

validmeasures/spatialsampler documentation built on Oct. 16, 2021, 3:15 a.m.