Fieldmap
database for inconsistenciesR/check_data_deadwood.R
check_data_deadwood.Rd
This function retrieves the important fields of table Deadwood (of all periods) from the given database and checks for missing data or wrong input.
check_data_deadwood(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_deadwood(path_to_fieldmapdb)
#> # A tibble: 2 × 6
#> plot_id lying_deadw_id period aberrant_field anomaly aberrant_value
#> <int> <int> <int> <chr> <chr> <dbl>
#> 1 101 11587 1 max_diameter_mm too low 10
#> 2 101 11587 1 alive_dead tree alive 11
check_data_deadwood(path_to_fieldmapdb, forest_reserve = "Everzwijnbad")
#> # A tibble: 2 × 6
#> plot_id lying_deadw_id period aberrant_field anomaly aberrant_value
#> <int> <int> <int> <chr> <chr> <dbl>
#> 1 101 11587 1 max_diameter_mm too low 10
#> 2 101 11587 1 alive_dead tree alive 11