Skip to contents

Controls two independent things about how report()/report_repository() build a report:

  • rendering mechanics – a full, interactive HTML report (light/dark theme toggle, sortable/paginated JavaScript tables, tabbed sections) vs. a "simple" static report with none of that – plain tables, stacked headings instead of tabs, a single theme, no inline <script> content. Email clients and mail scanners routinely flag the embedded JavaScript a full report carries (even though it is inert without a browser), so a "simple" report type is the setting to use before emailing a report.

  • content amount – every module's full detail vs. only the modules flagged red/yellow/fail (i.e. what needs attention), with just their one-line summary and no expandable detail, "How It Works" callout, or validation note. This is the "brief" setting, for getting to "what to improve" as fast as possible.

Usage

report_type(report_type = NULL)

Arguments

report_type

if one of "full", "brief", "simple", "simple_brief" or "checklist", sets the report type; NULL (the default) returns the current setting without changing it

Value

the current option value

Details

These two axes combine into four values: "full" (default), "brief", "simple", and "simple_brief". report_table() and any module building tabbed output (e.g. data_check's per-file table tabset) check this setting themselves, since they build their markdown/HTML while a module runs – before report() ever selects a template.

A fifth value, "checklist", lays the report out by check instead of by module: every check of every module is sorted into to fix, to check, decide by hand, for information, fine and not applicable, and each check that needs work says what was found and what to do on separate lines. It is rendered like "simple" (static, no JavaScript), in the colours and font of metacheck's website. A module gives its checks as a checks data frame in its output, one row per check, with the columns:

  • status: "fix", "improve", "decide" (decide by hand), "info", "fine" or "na" (not applicable)

  • title: the name of the check

  • found: what was found (markdown)

  • todo: what to do (markdown)

  • and optionally why and note (markdown), section (a label shown next to the title), and details (markdown, for example a scroll_table()) with details_title (the line that unfolds it)

A module without checks is shown as one check: its traffic light gives the result (red: to fix, yellow: to check, green: fine), its summary text what was found, and its report the folded details. A module can also give intro (a paragraph shown at the top) and logo (the path of an image shown next to metacheck's logo). A module that gives checklist_section (markdown) gets a section of its own, under its title, after the results and before "More detail", with its report folded at the end; its check then links to that section instead of folding the report. reproducibility_check gives one when it ran the code. When data_check or repo_check ran, the repository's file tree follows in a section "Files in the repository", shown open; data_check's folded report then leaves the tree out.

Examples

report_type()
#> [1] "full"
report_type("simple")
report_type("brief")
report_type("simple_brief")
report_type("checklist")
report_type("full")