Accounting, additional edit, and combined validation rules for lse_synthetic. The rules are stored as plain data frames of rule text so that the data set does not depend on the validate package; build the corresponding validate::validator objects with validate::validator(.data = lse_synthetic_rules$edit) before passing them to vimpute(method = "restricted").

Format

A named list with three data frames: accounting (36 rules), extra (56 rules), and edit (92 rules, the combination of both). Each has the columns

name

rule name (V01, V02, ...)

rule

the rule as R code, as accepted by validate::validator(.data = )

Examples


data(lse_synthetic_rules)
names(lse_synthetic_rules)
#> [1] "accounting" "extra"      "edit"      
head(lse_synthetic_rules$edit)
#>   name
#> 1  V01
#> 2  V02
#> 3  V03
#> 4  V04
#> 5  V05
#> 6  V06
#>                                                                                   rule
#> 1                                                               reporting_year >= 2021
#> 2                                                               reporting_year <= 2023
#> 3                                       onace_section %in% setdiff(LETTERS[2:19], "O")
#> 4                                                                 onace_group != "S94"
#> 5 nuts2 %in% c("AT11", "AT12", "AT13", "AT21", "AT22", "AT31", "AT32", "AT33", "AT34")
#> 6                data_source %in% c("primary_survey", "administrative", "model_based")
if (requireNamespace("validate", quietly = TRUE)) {
  edit_rules <- validate::validator(.data = lse_synthetic_rules$edit)
  length(edit_rules)
}
#> [1] 92