R/calc_reg_plot_height_species.R
calc_reg_plot_height_species.Rd
This function calculates for each plot, tree height class, species and year the number of regeneration (or interval with mean and confidence interval using a log transformation) and the approximate rubbing damage percentage per hectare for regeneration. For core area plots, these variables are calculated for each subplot.
calc_reg_plot_height_species(data_regeneration)
dataframe with columns plot
, subplot
, year
, height_class
,
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
.
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_species(data_regeneration)
#> # A tibble: 167 × 13
#> plottype plot_id subplot_id period year height_class species
#> <chr> <int> <int> <int> <int> <int> <int>
#> 1 CA 11000 155511 1 2000 NA NA
#> 2 CA 11000 155511 2 2011 1000 7
#> 3 CA 11000 155511 2 2011 2000 7
#> 4 CA 11000 155511 2 2011 3000 7
#> 5 CA 11000 155511 3 2021 1000 7
#> 6 CA 11000 155511 3 2021 2000 7
#> 7 CA 11000 155511 3 2021 3000 7
#> 8 CA 11000 155511 3 2021 4000 7
#> 9 CA 11000 155512 1 2000 NA NA
#> 10 CA 11000 155513 1 2000 NA NA
#> # ℹ 157 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>