Learn R Programming

biometrics (version 1.0.3)

gtree: Function to compute basal area of a tree

Description

The function computes the basal area of a tree (\(g\)), which only depends on its diameter at breast-height (\(d\)). The basal area of a tree is computed as $$g = \left(\frac{\pi}{k}\right) d^{2}$$ where the constant \(k\) depends on whether the diameter and the resulting basal area are in the units of the metric or imperial system.

Usage

gtree(x, metric = TRUE)

Value

The value of basal area in m\(^{2}\) or in ft\(^{2}\), depending on the units of measurement being defined.

Arguments

x

is the object (i.e., vector or scalar) having tree diameter. By default the function assumes that the unit of measurement of this variable is cm.

metric

is a logic value, the default is to TRUE, thus the diameter has to be expressed in cm, and the resulting basal area will be expressed in m\(^{2}\). If metric is FALSE, the diameter has to be in inches and the resulting basal area will be in ft\(^{2}\).

Author

Christian Salas-Eljatib

Examples

Run this code

#Using the function
 gtree(40)
 gtree(x=30)
gtree(x=11.81,metric=FALSE)

Run the code above in your browser using DataLab