Learn R Programming

dendrometry (version 0.0.4)

distanceH: Horizontal distance

Description

Horizontal distance calculation for sloping area.

Usage

distanceH(
  distance,
  angle,
  type = c("slope", "angle"),
  angleUnit = c("deg", "rad")
)

Value

A vector of horizontal distance.

Arguments

distance

numeric, vector of the distance measured on sloping area.

angle

numeric, vector of angle or slope values.

type

character, type of angle argument. Either "angle" or "slope". Default is "slope".

angleUnit

character, unit of angle measures if type = "angle". Either "deg" for degree or "rad" for radian. Default is "deg".

Examples

Run this code
distanceH(20, 30)
distanceH(20, angle = 30, type = "slope")
distanceH(20, angle = 25, type = "angle")

Run the code above in your browser using DataLab