View source: R/ComputeColleaguesGrowthMean.R
ComputeColleaguesGrowthMean | R Documentation |
Internal function of PhylogeneticHierarchicalCorrection()
ComputeColleaguesGrowthMean(
Colleagues,
Data,
PrevValue,
PositiveGrowthThreshold,
NegativeGrowthThreshold,
DBHRange
)
Colleagues |
'Colleagues' are the individuals other than the one whose diameter is to be corrected. Their diameter is included in the 'DBHRange' around the diameter to be corrected. They are either of the same species, the same genus, the same family or the same stand, depending on what the inventory proposes and the minimum selection criteria of the user ('MinIndividualNbr' argument of PhylogeneticHierarchicalCorrection()). (data.table) The dataset must contain the column: 'IdStem' or 'IdTree' (character) |
Data |
(data.table) The dataset must contain the columns:
|
PrevValue |
The last diameter value before the one to correct (cm) |
PositiveGrowthThreshold |
in cm/year : a tree widening by more than x cm/year 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) |
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) |
The average growth of 'colleagues' in the DBH range (numeric)
data(TestData)
PrevValue <- 17 # Estimated DBH (cm)
DBHRange = 10 # DBH range (cm)
# Find colleagues
Colleagues <- TestData[
ScientificName == "Licania membranacea" & # same species as the tree to be corrected
(Diameter > (PrevValue - DBHRange/2) & Diameter < (PrevValue + DBHRange/2))] # Diameter or DBHCor ?
ColleaguesCrescMean <- ComputeColleaguesGrowthMean(Colleagues = Colleagues, Data = TestData,
PrevValue = PrevValue,
PositiveGrowthThreshold = 5,
NegativeGrowthThreshold = -2,
DBHRange = DBHRange)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.