Skip to contents

Render a Quarto-based HTML audit report summarizing the results of a column-matching workflow.

Usage

render_report(
  log_dir = NULL,
  output_dir = NULL,
  output_file = NULL,
  open_browser = interactive(),
  create_dir = interactive()
)

Arguments

log_dir

Character string. Directory containing matching log files. Must include match_log_MASTER.csv.

output_dir

Character string. Directory where the rendered HTML report will be written.

output_file

Character string. Filename for the rendered HTML report. If NULL, a timestamped filename is generated automatically.

open_browser

Logical. If TRUE, the rendered report is opened in the default web browser upon successful rendering. Defaults to interactive().

create_dir

Logical. Controls what happens if output_dir does not exist. If TRUE, the directory is created automatically. If FALSE, an error is thrown. The default is interactive(), which asks for confirmation in an interactive session and throws an error otherwise.

Value

Invisibly returns the path where the rendered report is expected to be written.

Details

The report is generated from the bundled Quarto template (audit_report.qmd) included with the package and uses the log files located in log_dir.

A master log file named match_log_MASTER.csv must exist in log_dir; otherwise the report cannot be rendered.

During rendering, the report is executed with execute_dir = getwd(), allowing relative paths in the Quarto document (for example logs/matching) to be resolved relative to the current project directory.

The report template (audit_report.qmd) and associated assets are distributed with the package under inst/quarto/.

Quarto requires output_file to be a plain filename rather than a path. For this reason a timestamped filename is generated during rendering.

Examples

if (FALSE) { # \dontrun{
render_audit_report()

render_audit_report(
  log_dir = "logs/matching",
  output_dir = "reports"
)
} # }