Skip to contents

Writes a self-contained HTML report to a temp file and opens it in the Positron / RStudio Viewer pane (or the system browser as fallback). Intended for interactive use and the verify/ scripts.

Usage

verify_html_report(validation, title = "herald Validation Report")

Arguments

validation

A herald_validation object.

title

Report title. Default "herald Validation Report".

Value

The temp file path, invisibly.

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", EXTRA = "x", 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)
if (FALSE) { # \dontrun{
verify_html_report(result)
} # }