This function queries the given database to retrieve additional data on plots to save in forresdat and link with the datasets that are saved there.

load_plotinfo(database, plottype = NA, forest_reserve = NA, processed = TRUE)

Arguments

database

name of Fieldmap/Access database (with specific Fieldmap structure) including path

plottype

possibility to select only data for a certain plot type, e.g. 'CP' for Circular plot or 'CA' for Core area (the default NA means that data from all plots are retrieved)

forest_reserve

possibility to select only data for 1 forest reserve by giving the name of the forest reserve (the default NA means that data from all plots are retrieved)

processed

Should only processed and surveyed data be added? Defaults to TRUE (yes).

Value

Dataframe with columns plot_id, plottype, forest_reserve, period, year of dendrometric survey and information on (1) whether there has been a dendro, deadwood, regeneration and/or vegetation survey and (2) whether the data have been processed or not.

Examples

library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
  system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")
load_plotinfo(path_to_fieldmapdb)
#> Joining with `by = join_by(forest_reserve, plot_id, plottype, survey_trees)`
#>      forest_reserve plot_id plottype period survey_number year_dendro
#> 1      Everzwijnbad     101       CP      1             1        2002
#> 2   Withoefse heide     204       CP      1             1        2000
#> 3        Liedekerke    1005       CP      1             1        2006
#> 4  Kersselaerspleyn    2006       CP      1             1        2000
#> 5  Kersselaerspleyn   11000       CA      1             2        2000
#> 6            Harras   21000       CA      1             1        2008
#> 7      Sevendonck A  141100       CA      1             1        2007
#> 8      Everzwijnbad     101       CP      2             2        2012
#> 9   Withoefse heide     204       CP      2             2        2011
#> 10       Liedekerke    1005       CP      2             2        2016
#> 11 Kersselaerspleyn    2006       CP      2             2        2010
#> 12 Kersselaerspleyn   11000       CA      2             3        2010
#> 13           Harras   21000       CA      2             2        2018
#> 14     Sevendonck A  141100       CA      2             2        2016
#> 15 Kersselaerspleyn    2006       CP      3             3        2020
#> 16 Kersselaerspleyn   11000       CA      3             4        2020
#> 17 Kersselaerspleyn   11000       CA      0             1        1986
#>    survey_trees survey_deadw survey_veg survey_reg game_impact_veg
#> 1          TRUE         TRUE       TRUE       TRUE           FALSE
#> 2          TRUE         TRUE       TRUE       TRUE           FALSE
#> 3          TRUE         TRUE       TRUE       TRUE           FALSE
#> 4          TRUE        FALSE       TRUE       TRUE           FALSE
#> 5          TRUE        FALSE       TRUE       TRUE           FALSE
#> 6          TRUE         TRUE       TRUE       TRUE           FALSE
#> 7          TRUE         TRUE       TRUE       TRUE           FALSE
#> 8          TRUE         TRUE       TRUE       TRUE           FALSE
#> 9          TRUE         TRUE      FALSE       TRUE           FALSE
#> 10         TRUE         TRUE       TRUE       TRUE            TRUE
#> 11         TRUE         TRUE       TRUE       TRUE           FALSE
#> 12         TRUE         TRUE       TRUE       TRUE           FALSE
#> 13         TRUE         TRUE       TRUE       TRUE            TRUE
#> 14         TRUE         TRUE       TRUE       TRUE            TRUE
#> 15         TRUE         TRUE       TRUE       TRUE            TRUE
#> 16         TRUE         TRUE       TRUE       TRUE            TRUE
#> 17         TRUE        FALSE      FALSE      FALSE           FALSE
#>    game_impact_reg data_processed
#> 1            FALSE           TRUE
#> 2            FALSE           TRUE
#> 3            FALSE           TRUE
#> 4            FALSE           TRUE
#> 5            FALSE           TRUE
#> 6            FALSE           TRUE
#> 7            FALSE           TRUE
#> 8            FALSE           TRUE
#> 9            FALSE           TRUE
#> 10            TRUE           TRUE
#> 11           FALSE           TRUE
#> 12           FALSE           TRUE
#> 13            TRUE           TRUE
#> 14            TRUE           TRUE
#> 15            TRUE           TRUE
#> 16            TRUE           TRUE
#> 17           FALSE           TRUE