Skip to contents

Creates a lightweight reference to a validation rule configuration. Supports two modes:

  1. Herald shorthand (single string): e.g., rule_config("fda-sdtm-ig-3.3"). Looks up the herald config from the cached herald-rules repository.

  2. 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.

Usage

rule_config(version, authority, standard, path = NULL)

Arguments

version

Either a herald config shorthand string (e.g., "fda-sdtm-ig-3.3") when authority and standard are missing, or a P21 version string (e.g., "2204.0") when all three are provided.

authority

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() when NULL.

Value

A herald_rule_config S3 object.

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")
} # }