This function calculates for each plot, tree height class and year the number of species, total number of regeneration (or interval with mean and confidence interval using a log transformation) and approximate rubbing damage percentage for regeneration. For core area plots, these variables are calculated for each subplot.

calc_reg_plot_height(data_regeneration)

Arguments

data_regeneration

dataframe on tree regeneration with variables plot_id, plottype, subplot_id, height_class, species, nr_of_regeneration, rubbing_damage_number, period, year, subcircle, plotarea_ha, min_number_of_regeneration and max_number_of_regeneration.

Value

dataframe with columns plot, subplot, year, period, height_class, number_of_tree_species, approx_rubbing_damage_perc, mean_number_of_regeneration_ha, lci_number_of_regeneration_ha, uci_number_of_regeneration_ha and approx_nr_regeneration_ha.

Examples

library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
  system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")
data_regeneration <- load_data_regeneration(path_to_fieldmapdb)
calc_reg_plot_height(data_regeneration)
#> # A tibble: 76 × 13
#>    plottype plot_id subplot_id period  year height_class number_of_tree_species
#>    <chr>      <int>      <int>  <int> <int>        <int>                  <int>
#>  1 CA         11000     155511      1  2000           NA                      0
#>  2 CA         11000     155511      2  2011         1000                      1
#>  3 CA         11000     155511      2  2011         2000                      1
#>  4 CA         11000     155511      2  2011         3000                      1
#>  5 CA         11000     155511      3  2021         1000                      1
#>  6 CA         11000     155511      3  2021         2000                      1
#>  7 CA         11000     155511      3  2021         3000                      1
#>  8 CA         11000     155511      3  2021         4000                      1
#>  9 CA         11000     155512      1  2000           NA                      0
#> 10 CA         11000     155513      1  2000           NA                      0
#> # ℹ 66 more rows
#> # ℹ 6 more variables: approx_nr_regeneration_ha <dbl>,
#> #   approx_rubbing_damage_perc <dbl>, rubbing_damage_number_ha <dbl>,
#> #   mean_number_of_regeneration_ha <dbl>, lci_number_of_regeneration_ha <dbl>,
#> #   uci_number_of_regeneration_ha <dbl>