Learn R Programming

dendrometry (version 0.0.2)

height: Height of tree or vertical object.

Description

Computes the height of tree, pillar, girder, mast or any vertical object. Allows both slope (in per cent) and angle measures (in degree or radian) . No matter the relative position of the persons who measures angle/slope.

Usage

height(distance, top, base, type = c("angle", "slope"),
       angleUnit = c("deg", "rad"))

Value

A vector of heights.

Arguments

distance

numeric vector of the horizontal distance between object and the person who measures angle.

top, base

numeric vector of top angle and ground angle respectively (readings from a clinometer).

type

the type of top and base measures. Either "angle" or "slope". Default is "slope".

angleUnit

the unit of top and base measures when type = "angle". Either "deg" for degree or "rad" for radian. Default is "deg".

Author

Narcisse Yehouenou narcisstar211@gmail.com

Examples

Run this code
height(10, 80, 17)
height(17, top = -18, base = -113)
height(distance = 18, top = 42, base = -12, type = "angle", angleUnit = "deg")
height(distance = 18:21, top = 42:45, base = -12:-15, type = "angle", angleUnit = "deg")
## Bellow shows warning messages
height(distance = 18:21, top = -42:-45, base = -12:-15, type = "angle", angleUnit = "deg")

Run the code above in your browser using DataLab