This function calculates for each plot and year the number of species, total number of seedlings and established regeneration (or interval with mean and confidence interval using a log transformation) and approximate rubbing damage percentage for seedlings and established regeneration. For core area plots, these variables are calculated for each subplot.
calc_reg_plot(data_regeneration)
dataframe with columns plot
, subplot
, year
, period
,
number_of_tree_species
, nr_of_tree_species_established
,
mean_number_established_ha
, lci_number_established_ha
,
uci_number_established_ha
,
mean_number_seedlings_ha
, lci_number_seedlings_ha
,
uci_number_seedlings_ha
,
mean_rubbing_damage_perc_established
,
lci_rubbing_damage_perc_established
,
uci_rubbing_damage_perc_established
,
mean_rubbing_damage_perc_seedlings
, lci_rubbing_damage_perc_seedlings
,
uci_rubbing_damage_perc_seedlings
,
approx_nr_established_ha
, approx_nr_seedlings_ha
,
approx_rubbing_damage_perc_established
,
approx_rubbing_damage_perc_seedlings
.
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(data_regeneration)
#> # A tibble: 30 × 25
#> plottype plot_id subplot_id period year number_of_tree_species
#> <chr> <int> <int> <int> <int> <int>
#> 1 CA 11000 155511 1 2000 0
#> 2 CA 11000 155511 2 2011 1
#> 3 CA 11000 155511 3 2021 1
#> 4 CA 11000 155512 1 2000 0
#> 5 CA 11000 155513 1 2000 0
#> 6 CA 11000 155521 2 2011 2
#> 7 CA 11000 155521 3 2021 1
#> 8 CA 11000 155531 2 2011 2
#> 9 CA 11000 155531 3 2021 3
#> 10 CA 21000 1 1 2009 4
#> # ℹ 20 more rows
#> # ℹ 19 more variables: nr_of_tree_species_established <int>,
#> # approx_nr_established_ha <dbl>, approx_nr_seedlings_ha <dbl>,
#> # approx_rubbing_damage_perc_established <dbl>,
#> # approx_rubbing_damage_perc_seedlings <dbl>,
#> # rubbing_damage_nr_established_ha <dbl>,
#> # rubbing_damage_nr_seedlings_ha <dbl>, mean_number_established_ha <dbl>, …