R/calculate_vegetation.R
calculate_vegetation.Rd
This function makes aggregations of vegetation data on the levels of
plot and year
subplot and year (only for plot type 'core area')
plot, species and year (only for plot type 'core area')
calculate_vegetation(data_vegetation, data_herblayer)
List of dataframes that are mentioned in the above description
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)
calculate_vegetation(data_vegetation, data_herblayer)
#> $veg_by_plot
#> # 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>, …
#>
#> $veg_by_core_area_species
#> # 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>
#>