Regeneration
from Fieldmap
database for inconsistenciesR/check_data_regeneration.R
check_data_regeneration.Rd
This function retrieves the important fields of table Regeneration
(of all periods) from the given database and
checks for missing data or wrong input.
check_data_regeneration(database, forest_reserve = "all")
Dataframe with inconsistent data with ID's and additional columns
aberrant_field
(which column is wrong) and anomaly
(what is wrong with
the input)
library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")
check_data_regeneration(path_to_fieldmapdb)
#> # A tibble: 2 × 6
#> plot_id subplot_id period aberrant_field anomaly aberrant_value
#> <int> <int> <int> <chr> <chr> <chr>
#> 1 204 1 3 date missing NA
#> 2 204 1 3 fieldteam missing NA
check_data_regeneration(path_to_fieldmapdb, forest_reserve = "Everzwijnbad")
#> # A tibble: 0 × 6
#> # ℹ 6 variables: plot_id <int>, subplot_id <int>, period <int>,
#> # aberrant_field <chr>, anomaly <lgl>, aberrant_value <chr>