This function calculates for each plot, species and year the percentage of subplots in which the species is present and the percentage of subplots where the species is browsed (relative to the plots where it is present). A difference is made between browsed (which contains all damage) and seriously browsed, which is reported if the damage is more than 1/20. This calculation is designed for core areas, that consist of different subplots. Year refers to year of recording of that specific species (source is table data_herblayer), and is possibly different for spring flora than for other species in the same subplot.

calc_veg_core_area_species(data_herblayer)

Arguments

data_herblayer

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

Value

dataframe with columns plot, species, year (year of recording of specific species, possibly different for spring flora), number_of_subplots (= number of subplots where the species occurs), perc_of_subplots (= percentage of subplots with species), number_of_subplots_browsed, perc_of_subplots_browsed, number_of_subplots_seriously_browsed, perc_of_subplots_seriously_browsed and mean_coverage_class_average_perc

Examples

library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
  system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")
data_herblayer_CA <- load_data_herblayer(path_to_fieldmapdb, plottype = "CA")
calc_veg_core_area_species(data_herblayer_CA)
#> # A tibble: 11 × 12
#>    plottype plot_id period  year species number_of_subplots_w…¹ perc_of_subplots
#>    <chr>      <int>  <int> <int>   <int>                  <int>            <dbl>
#>  1 CA         11000      1  2000      NA                      3            100  
#>  2 CA         11000      2  2011     131                      2             66.7
#>  3 CA         11000      2  2011      NA                      1             33.3
#>  4 CA         11000      3  2021     131                      2             66.7
#>  5 CA         11000      3  2021     161                      1             33.3
#>  6 CA         11000      3  2021      NA                      1             33.3
#>  7 CA         21000      1  2009     131                     10            100  
#>  8 CA         21000      1  2009     161                      1             10  
#>  9 CA         21000      2  2019     131                     10            100  
#> 10 CA        141100      1  2007     161                      3            100  
#> 11 CA        141100      2  2017     161                      3            100  
#> # ℹ abbreviated name: ¹​number_of_subplots_with_vegetation
#> # ℹ 5 more variables: number_of_subplots_browsed <int>,
#> #   number_of_subplots_seriously_browsed <int>, perc_of_subplots_browsed <dbl>,
#> #   perc_of_subplots_seriously_browsed <dbl>,
#> #   mean_coverage_class_average_perc <dbl>