Renders a herald_validation object in multiple formats. HTML reports
are self-contained interactive files with filtering, sorting, and search.
Excel reports match the P21 5-sheet structure. JSON reports are
machine-readable for CI/CD pipelines. CSV provides flat export.
Arguments
- validation
A
herald_validationobject fromvalidate().- path
Output file path. Extension determines format:
.htmlfor interactive HTML,.xlsxfor Excel,.jsonfor CI/CD JSON,.csvfor flat CSV.- title
Report title. Default
"herald Validation Report".
See also
validate() for generating findings.
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(),
rule_config(),
update_core_rules(),
validate(),
validate_spec(),
validate_spec_define(),
verify_html_report()
Examples
spec <- herald_spec(
ds_spec = data.frame(dataset = "DM", label = "Demographics",
stringsAsFactors = FALSE),
var_spec = data.frame(dataset = "DM", variable = "STUDYID",
label = "Study ID", data_type = "text",
length = "12", stringsAsFactors = FALSE)
)
dm <- data.frame(STUDYID = "S1", stringsAsFactors = FALSE)
dir <- tempfile()
dir.create(dir)
write_xpt(dm, file.path(dir, "dm.xpt"), dataset = "DM")
result <- validate(dir, spec = spec)
unlink(dir, recursive = TRUE)
## -- CSV report -----------------------------------------------------------
tmp <- tempfile(fileext = ".csv")
validation_report(result, tmp)
#> ✔ Wrote validation report to /tmp/RtmpB1uFfd/file3fd5194fd78e.csv
unlink(tmp)
