Trees
from Fieldmap
database for inconsistencies between periodsR/check_trees_evolution.R
check_trees_evolution.Rd
This function retrieves the important fields of table Trees
(of all
periods) from the given database and checks for anomalies between periods,
such as zombies, shifters, outlier_height, outlier_diameter or walkers.
check_trees_evolution(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_trees_evolution(path_to_fieldmapdb)
#> # A tibble: 4 × 7
#> plot_id period tree_measure_id aberrant_field anomaly aberrant_value tree_id
#> <int> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 1005 1_2 2217_17 dbh_mm outlier_… 325_425 1_1005…
#> 2 11000 1_2 1762_2158 dbh_mm outlier_… 300_370 1_1100…
#> 3 21000 1_2 20_18 height_m outlier_… 29.01_36.511 1_2100…
#> 4 11000 0_1 182_182 dbh_mm outlier_… 750_870 0_1100…
check_trees_evolution(path_to_fieldmapdb, forest_reserve = "Everzwijnbad")
#> Warning: There was 1 warning in `mutate()`.
#> ℹ In argument: `min_period = min(.data$period)`.
#> Caused by warning in `min()`:
#> ! no non-missing arguments to min; returning Inf
#> # A tibble: 0 × 6
#> # ℹ 6 variables: plot_id <int>, period <chr>, tree_measure_id <chr>,
#> # old_id <chr>, aberrant_field <chr>, anomaly <chr>