area_hex: Calculates the area of a hexagon given either the longer...

View source: R/math_funcs.R

area_hexR Documentation

Calculates the area of a hexagon given either the longer radius R or the apothem r

Description

from https://stackoverflow.com/a/59022366

Usage

area_hex(R = waiver(), r = waiver())

Arguments

R

The longer, or maximal, radius of a hexagon, from center to vertex Also the length of one of the sides.

r

The apothem, or shorter radius of a hexagon, from center to side

Value

A numeric vector of areas, in the same units as r and/or R

Examples

## Not run: 
 r <- 1.74 / 2
 area_hex(r = r)
 R <- 2 / 2
 area_hex(R = R)
 area_hex(R = R, r = r)

## End(Not run)

tomhopper/numbr documentation built on Nov. 5, 2022, 11:35 p.m.