This function calculates for each plot (subplot in case of core area) and year the total coverage and the number of species in the vegetation layer. Year refers to year of the main vegetation survey (source is table "data_vegetation"), and will in some cases differ from the year of the spring flora survey.

calc_veg_plot(data_vegetation, data_herblayer)

Arguments

data_vegetation

dataframe on vegetation with variables ...

data_herblayer

dataframe on vegetation in the species level ('herb layer') with variables ...

Value

dataframe with columns plot, subplot, date, year (year of main vegetation survey, possible deviating year of spring survey not taken into account), number_of_tree_species and min/max/mid cover of the different vegetation layers (moss, herb, shrub, tree), the waterlayer and since 2015 also of the soildisturbance by game.

Examples

library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
  system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")
data_vegetation <- load_data_vegetation(path_to_fieldmapdb)
data_herblayer <- load_data_herblayer(path_to_fieldmapdb)
calc_veg_plot(data_vegetation, data_herblayer)
#> # A tibble: 43 × 29
#>    plottype plot_id subplot_id period year_main_survey date_vegetation    
#>    <chr>      <int>      <int>  <int>            <int> <dttm>             
#>  1 CA         11000     155511      1             2000 2000-08-01 00:00:00
#>  2 CA         11000     155511      2             2011 2011-06-24 00:00:00
#>  3 CA         11000     155511      3             2021 2021-07-20 00:00:00
#>  4 CA         11000     155512      1             2000 2000-08-01 00:00:00
#>  5 CA         11000     155513      1             2000 2000-08-01 00:00:00
#>  6 CA         11000     155521      2             2011 2011-06-24 00:00:00
#>  7 CA         11000     155521      3             2021 2021-07-20 00:00:00
#>  8 CA         11000     155531      2             2011 2011-06-24 00:00:00
#>  9 CA         11000     155531      3             2021 2021-07-20 00:00:00
#> 10 CA         21000         17      1             2009 2009-06-17 00:00:00
#> # ℹ 33 more rows
#> # ℹ 23 more variables: number_of_species <int>,
#> #   cumm_herb_coverage_class_average_perc <dbl>, moss_cover_min <dbl>,
#> #   moss_cover_max <dbl>, moss_cover_mid <dbl>, herb_cover_min <dbl>,
#> #   herb_cover_max <dbl>, herb_cover_mid <dbl>, shrub_cover_min <dbl>,
#> #   shrub_cover_max <dbl>, shrub_cover_mid <dbl>, tree_cover_min <dbl>,
#> #   tree_cover_max <dbl>, tree_cover_mid <dbl>, waterlayer_cover_min <dbl>, …