calc_variables_tree_level: Calculate additional variables on tree level

View source: R/calc_variables_tree_level.R

calc_variables_tree_levelR Documentation

Calculate additional variables on tree level

Description

This function calculates additional variables based on measurements, such as

  • nr_of_stems: the number of shoots in the tree (= 1 for an individual tree; >= 1 when coppice)

  • individual: true for individual tree or coppice, false if record is a secondary shoot

  • calc_height_m: calculated height based on dbh_mm and a species specific diameter-height model

  • basal_area_m2

  • vol_bole_m3: calculated based on dbh_mm, calc_height_m and species specific tariffs

  • vol_crown_m3: calculated based on dbh_mm and species specific tariffs

  • vol_tot_m3: sum of vol_bole_m3 and vol_crowwn_m3

  • dbh_mm (based on average for coppice trees)

  • decaystage (based on average for coppice trees)

  • basal_area_alive_m2_ha

  • basal_area_dead_m2_ha

  • vol_alive_m3_ha

  • vol_dead_standing_m3_ha

  • vol_bole_alive_m3_ha

  • vol_bole_dead_m3_ha

Usage

calc_variables_tree_level(data_dendro, data_stems_calc)

Arguments

data_dendro

dataframe on tree measures with variables plot_id, plottype, tree_measure_id, date_dendro, dbh_mm, height_m, species, alive_dead, decaystage, period, old_id, year, subcircle, plotarea_ha,... (output of function load_data_dendrometry())

data_stems_calc

dataframe on stem level measurements with variables plot_id, plottype, tree_measure_id, date_dendro, dbh_mm, height_m, species, alive_dead, decaystage, period, year, subcircle, plotarea_ha,... (output of function calc_variables_stem_level())

Value

Dataframe with ...

Examples

library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
  system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")

data_dendro <- load_data_dendrometry(path_to_fieldmapdb)
data_shoots <- load_data_shoots(path_to_fieldmapdb)
data_stems <- compose_stem_data(data_dendro, data_shoots)
# omit argument 'example_dataset = TRUE' below to use all height models
height_model <- load_height_models(example_dataset = TRUE)
data_stems_calc <- calc_variables_stem_level(data_stems, height_model)
calc_variables_tree_level(data_dendro, data_stems_calc)


inbo/forrescalc documentation built on Sept. 28, 2024, 11:45 a.m.