ComputeColleaguesGrowthMean: Compute Colleagues Growth Mean

View source: R/ComputeColleaguesGrowthMean.R

ComputeColleaguesGrowthMeanR Documentation

Compute Colleagues Growth Mean

Description

Internal function of PhylogeneticHierarchicalCorrection()

Usage

ComputeColleaguesGrowthMean(
  Colleagues,
  Data,
  PrevValue,
  PositiveGrowthThreshold,
  NegativeGrowthThreshold,
  DBHRange
)

Arguments

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:

  • 'IdStem' or 'IdTree' (character)

  • 'Diameter' (numeric)

  • 'Year' (numeric)

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)

Value

The average growth of 'colleagues' in the DBH range (numeric)

Examples

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)


VincyaneBadouard/TreeData documentation built on Jan. 4, 2024, 2:56 a.m.