View source: R/TaperCorrection.R
TaperCorrection | R Documentation |
Transform the tree diameter measured at a given height into the diameter corresponding to the default measurement height (HOM), using an allometry.
TaperCorrection(
Data,
DefaultHOM = 1.3,
TaperParameter = function(DAB, HOM) 0.156 - 0.023 * log(DAB) - 0.021 * log(HOM),
TaperFormula = function(DAB, HOM, TaperParameter, DefaultHOM) DAB/(exp(-TaperParameter
* (HOM - DefaultHOM))),
DetectOnly = FALSE
)
Data |
Dataset (data.frame or data.table) The dataset must contain the columns:
|
DefaultHOM |
Default Height Of Measurement in meter (Default: 1.3 m) (numeric, 1 value) |
TaperParameter |
Taper parameter (unitless) formula (function) Default: TaperParameter = 0.156 - 0.023 log(DAB) - 0.021 log(HOM) of Cushman et al.2021. With:
|
TaperFormula |
Taper formula (function) Default: DAB / (e^(- TaperParameter (HOM - DefaultHOM))) of Cushman et al.2021. With:
|
DetectOnly |
TRUE: Only detect errors, FALSE: detect and correct errors (Default: FALSE) (logical) |
Fill the Comment column with error type informations. If DetectOnly = FALSE, add columns: - TaperDBH_TreeDataCor: corrected trees diameter at default HOM - DiameterCorrectionMeth = "taper" - HOM_TreeDataCor (numeric): HOM corresponding to the TaperDBH_TreeDataCor (= DefaultHOM)
library(data.table)
Data <- data.table(IdStem = "A",
ScientificName = "Tree",
Year = c(1998, 2008, 2016, 2017, 2018, 2019, 2021),
Diameter = c(19, 19, 21.4, 22.6, 23.1, 23.1, 23.6),
HOM = c(1.30, 3.25, 3.25, 3.25, 3.25, 3.25, 3.25))
Rslt <- TaperCorrection(Data)
DiameterCorrectionPlot(Rslt, CorCol = "TaperDBH_TreeDataCor")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.