Creates a lightweight reference to a validation rule configuration. Supports two modes:
Herald shorthand (single string): e.g.,
rule_config("fda-sdtm-ig-3.3"). Looks up the herald config from the cached herald-rules repository.P21 explicit (three strings): e.g.,
rule_config("2204.0", "fda", "sdtm-ig-3.3"). References a Pinnacle 21 Community rule directory.
The actual YAML files are loaded lazily when passed to validate()
via the rules argument.
Arguments
- version
Either a herald config shorthand string (e.g.,
"fda-sdtm-ig-3.3") whenauthorityandstandardare missing, or a P21 version string (e.g.,"2204.0") when all three are provided.Regulatory authority (e.g.,
"fda","nmpa"). Required for P21 mode, omit for herald shorthand.- standard
Standard identifier (e.g.,
"sdtm-ig-3.3","adam-ig-1.1"). Required for P21 mode, omit for herald shorthand.- path
Path to the P21 rules root directory. Only used in P21 mode. Resolved the same way as
rule_catalog()whenNULL.
See also
rule_catalog() to discover available configurations,
validate() to run rules.
Other conformance:
adam_rules(),
build_anchor_index(),
clear_ct(),
fda_rules(),
fetch_core_rules(),
fetch_herald_rules(),
herald_rules_cache_dir(),
list_ct(),
load_herald_config(),
new_herald_context(),
pmda_rules(),
register_ct(),
register_operator(),
rule_catalog(),
update_core_rules(),
validate(),
validate_spec(),
validate_spec_define(),
validation_report(),
verify_html_report()
Examples
if (FALSE) { # \dontrun{
# Herald shorthand (recommended)
config <- rule_config("fda-sdtm-ig-3.3")
validate("/path/to/data/", spec = spec, rules = config)
# P21 explicit
config <- rule_config("2204.0", "fda", "sdtm-ig-3.3")
} # }
