Suggests rules using the various suggestion checks. Use the more specific suggest functions for more control.

suggest_rules(
  d,
  vars = names(d),
  domain_check = TRUE,
  range_check = TRUE,
  pos_check = TRUE,
  type_check = TRUE,
  na_check = TRUE,
  unique_check = TRUE,
  ratio_check = TRUE,
  conditional_rule = TRUE
)

suggest_all(
  d,
  vars = names(d),
  domain_check = TRUE,
  range_check = TRUE,
  pos_check = TRUE,
  type_check = TRUE,
  na_check = TRUE,
  unique_check = TRUE,
  ratio_check = TRUE,
  conditional_rule = TRUE
)

write_all_suggestions(
  d,
  vars = names(d),
  file = stdout(),
  domain_check = TRUE,
  range_check = TRUE,
  type_check = TRUE,
  pos_check = TRUE,
  na_check = TRUE,
  unique_check = TRUE,
  ratio_check = TRUE,
  conditional_rule = TRUE
)

Arguments

d

data.frame, used to generate the checks

vars

character optionally the subset of variables to be used.

domain_check

if TRUE include domain_check

range_check

if TRUE include range_check

pos_check

if TRUE include pos_check

type_check

if TRUE include type_check

na_check

if TRUE include na_check

unique_check

if TRUE include unique_check

ratio_check

if TRUE include ratio_check

conditional_rule

if TRUE include cond_rule

file

file to which the checks will be written to.

Value

returns validate::validator() object with the suggested rules. write_all_suggestions write the rules to file and returns invisibly a named list of ranges for each variable.