Skip to contents

Render a standalone HTML audit report

Usage

render_audit(
  result,
  file,
  include_evidence = FALSE,
  title = "A deliberate look"
)

Arguments

result

A result from audit_dp().

file

Destination HTML path.

include_evidence

Include raw source excerpts and participant IDs. Default FALSE; the returned R object always retains supplied evidence.

title

Report title.

Value

The normalized output path, invisibly. Requires rmarkdown and Pandoc.

Examples

report_packages <- c("rmarkdown", "knitr", "bslib", "ggplot2", "gt", "DT", "htmltools")
if (all(vapply(report_packages, requireNamespace, logical(1), quietly = TRUE)) &&
    rmarkdown::pandoc_available()) {
  result <- audit_dp(example_deliberation(), config = audit_config(permutations = 9))
  file <- tempfile(fileext = ".html")
  render_audit(result, file)
  unlink(file)
}