calculate_area: Function to calculate the area size of the resulting hexagon...

Description Usage Arguments Value Author(s) Examples

View source: R/calculate_area.R

Description

Function to calculate the area size of the resulting hexagon in a hexagonal grid and the area size of the resulting triangle in a triangular grid for a specified value of d (in kilometres) used in the simple spatial sampling method (S3M).

Usage

1
calculate_area(d, digits = NULL)

Arguments

d

A numeric value for length (in kilometres) of the maximum distance of a village/community from a sampling point.

digits

A numeric value specifying the number of digits to round off the resulting area size. Default is NULL

Value

A data.frame of 1 row and 2 columns. First column is for the area (in square kilometres) for a triangle. Second column is for the area (in square kilometres) for a hexagon.

Author(s)

Ernest Guevarra based on equations by Mark Myatt

Examples

1
2
# Calculate the area of the triangle and hexagon for a d of 10 kilometres
calculate_area(d = 10, digits = 2)

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