getBark: Get double bark thickness of tree at given height Hx

getBarkR Documentation

Get double bark thickness of tree at given height Hx

Description

this function calculates double bark thickness in given height for a given tree

Usage

getBark(tree, ...)

## S3 method for class 'data.frame'
getBark(tree, Hx = NULL, mapping = NULL, ...)

## S3 method for class 'list'
getBark(tree, Hx = NULL, mapping = NULL, ...)

## S3 method for class 'datBDAT'
getBark(tree, Hx = NULL, mapping = NULL, ...)

Arguments

tree

either a data.frame or a list containing the variables needed to decribe a tree, i.e. spp, D1, H, and optionally H1, D2, H2. Additionally, parameter Hx might be directly given via tree. See buildTree for more details and parameter mapping for mapping of variable names.

...

passing arguments to methods.

Hx

height in tree for which double bark thickness is required

mapping

mapping of variable names in case a data.frame is given into parameter tree between colnames(tree) and required parameter names. See details.

Details

This function returns double bark thickness in given height Hx in stem taper (hence, it depends on the diameter in given height). This can be added to an diameter under bark to get the diameter over bark. Parameter tree is able to take either a data.frame with correct variables names or arbitrary names if mapping is provided to map the data.frame names to the required names by c("df-colname" = "var-name") or to take a named list.

Value

vector of double bark thickness given height Hx inside stem taper

Methods (by class)

  • data.frame: transforming data.frame before calling getBark using buildTree

  • list: transforming list before calling getBark using buildTree

  • datBDAT: class method for class datBDAT

Examples

tree <- data.frame(spp = c(1, 1), D1 = c(30, 25), H = c(25, 25), Hx = c(1.3, 22.248))
getBark(tree)
tree <- data.frame(BDATCode = c(1, 1), dbh = c(30, 25), h = c(25, 25), Hx = c(1.3, 22.248))
getBark(tree, mapping = c("BDATCode" = "spp", "dbh" = "D1", "h" = "H"))
tree <- data.frame(BDATCode = c(1, 1), dbh = c(30, 25), h = c(25, 25))
Hx <- list(Hx = c(1.3, 22.248))
getBark(tree = tree, Hx = Hx, mapping = c("BDATCode" = "spp", "dbh" = "D1", "h" = "H"))

rBDAT documentation built on Oct. 14, 2022, 5:07 p.m.