export_report: Render the screening report as a self-contained HTML document

View source: R/report_html.R

export_reportR Documentation

Render the screening report as a self-contained HTML document

Description

Knits the packaged R Markdown template with whatever project artefacts are supplied and returns the path to the rendered HTML file. Open it in a browser to view; use the browser's Print > Save as PDF to archive as PDF (this avoids the LaTeX install that a direct PDF backend would need).

Usage

export_report(
  output_file = NULL,
  project = NULL,
  ranked = NULL,
  plan = NULL,
  decisions = NULL,
  criteria = NULL,
  ensemble = NULL
)

Arguments

output_file

Path to write the HTML report to. Defaults to a file in tempdir().

project

Optional project name (for the report header).

ranked

Optional ranked corpus tibble.

plan

Optional screenllm_plan object.

decisions

Optional tibble of human decisions.

criteria

Optional screenllm_criteria object.

ensemble

Optional screenllm_ensemble object.

Details

All artefact arguments default to NULL; the template fills in "(not recorded)" for anything missing, so the same call works whether the reviewer is midway through screening or fully finished.

Value

Invisibly, the path to the rendered HTML file.

Examples


# Render a minimal report to a temporary HTML file.
ranked <- data.frame(
  id = "r1", title = "Example study", abstract = "A short abstract.",
  universal_best_score = 80, rank = 1
)
out <- tempfile(fileext = ".html")
export_report(output_file = out, ranked = ranked)


screenllm documentation built on Sept. 24, 2026, 5:11 p.m.