View source: R/FullErrorProcessing.R
FullErrorProcessing | R Documentation |
Full error processing
FullErrorProcessing(
Data,
DetectOnly = FALSE,
Source = NULL,
WFOData = NULL,
InvariantColumns = c("Site", "Genus_TreeDataCor", "Species_TreeDataCor",
"Family_TreeDataCor", "ScientificName_TreeDataCor"),
DeathConfirmation = 2,
UseSize = FALSE,
RemoveRBeforeAlive = FALSE,
RemoveRAfterDeath = FALSE,
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))),
KeepMeas = c("MaxHOM", "MaxDate"),
MaxDBH = 500,
PositiveGrowthThreshold = 5,
NegativeGrowthThreshold = -2,
Pioneers = NULL,
PioneersGrowthThreshold = 7.5,
WhatToCorrect = c("taper", "POM change", "punctual", "shift"),
CorrectionType = c("individual", "phylogenetic hierarchical"),
DBHRange = 10,
MinIndividualNbr = 5,
OtherCrit = NULL,
Digits = 1L,
DBHCorForDeadTrees = TRUE,
coef = 0.9,
MinDBH = 10
)
Data |
Dataset (data.frame or data.table) |
DetectOnly |
TRUE: Only detect errors, FALSE: detect and correct errors (Default: FALSE) (logical) |
Source |
(character) To correct and standardise, you can choose between:
|
WFOData |
To be filled in if the argument |
InvariantColumns |
Vector with the names of the columns that are supposed to have always the same value for each measurement of the same tree (character). It is recommended to use the columns that have already been corrected, such as the columns containing the corrected botanical information. |
DeathConfirmation |
Number of times (censuses) needed for an unseen tree to be considered dead (numeric) (Default = 2 censuses) |
UseSize |
Use the size presence as a witness of the living status of the tree (logical) (Default = FALSE) |
RemoveRBeforeAlive |
Do you want to delete the rows about the tree before it was seen alive for the 1st time? (logical) |
RemoveRAfterDeath |
After correction do you want to delete the rows concerning the tree after its death? (logical) |
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:
|
KeepMeas |
In case of multiple diameter measurements in the same census year: Possible values: "MaxHOM", "MaxDate" (character).
|
MaxDBH |
Maximum possible DBH (Diameter at the default HOM) of your stand in cm (numeric, 1 value) |
PositiveGrowthThreshold |
in cm/year: a tree widening by more than this value is considered abnormal (numeric, 1 value) |
NegativeGrowthThreshold |
in cm/census: the possible positive measurement error (+n) cannot be corrected until the growth appears abnormal, but a negative measurement error can be allowed until -n (a tree does not decrease). Thus the positive measurement error (+n) is "compensated". (numeric, 1 value) |
Pioneers |
Scientific names of the pioneer species of the site, as in
the |
PioneersGrowthThreshold |
in cm/year: a tree of a pioneer species that widens by more than this value is considered abnormal (numeric, 1 value) |
WhatToCorrect |
Possible values: "POM change", "punctual", "shift" (character)
|
CorrectionType |
Possible values: "individual", "phylogenetic hierarchical" (character).
|
DBHRange |
DBH range in cm to take into account to select other trees in the dataset to apply "phylogenetic hierarchical" correction (Default: 10 cm) (numeric, 1 value) |
MinIndividualNbr |
Minimum number of individuals to take into account in "phylogenetic hierarchical" correction (Default: 5) (numeric, 1 value) |
OtherCrit |
Other criteria to select the individuals used for the calculation of the mean growth in the "phylogenetic hierarchical" correction. Give the name of the column(s) for which the individuals must have the same value as the tree to correct (e.g. c("Plot", "Subplot")) (character) |
Digits |
Number of decimal places to be used in the |
DBHCorForDeadTrees |
(logical) TRUE: return DBHCor also for dead trees. FALSE: do not return DBHCor for dead trees. In this case it is advisable to have corrected the tree life status with the StatusCorrection() function. |
coef |
description... (numeric) |
MinDBH |
Minimum diameter of trees inventoried according to your protocol (in cm) (numeric, 1 value) (Default = 10 cm) |
Detect errors or detect and correct errors:
Check general errors (GeneralErrorsDetection)
Check botanical identification (BotanicalCorrection)
Check the life status evolution of the trees/stems (StatusCorrection)
Apply a taper allometry on diameters measured at heights different from the default(TaperCorrection)
Check diameter evolution of the trees (DiameterCorrection)
Check tree/stem recruitment (RecruitmentCorrection)
The original dataset (data.table) with a Comment column containing information on the errors detected per row, the correction columns, and columns containing correction methods.
GeneralErrorsDetection, BotanicalCorrection, StatusCorrection, TaperCorrection, DiameterCorrection, RecruitmentCorrection
data(TestData)
Rslt <- FullErrorProcessing(TestData, DetectOnly = TRUE)
## Not run:
WFO_Backbone <- file.choose()
load(WFO_Backbone)
Rslt_Test <- FullErrorProcessing(TestData, Source = "WFO", WFOData = WFO_Backbone)
Rslt_Panama <- FullErrorProcessing(PanamaFormated, Source = "WFO", WFOData = WFO_Backbone)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.