Skip to contents

This function renders a report from a R Markdown (.Rmd) or Quarto Markdown (.Qmd) script. It is designed to be invoked from `render_report.R`. The rendered report is saved in either PDF or HTML format with a timestamp appended to the filename.

Usage

render_report(script_path)

Arguments

script_path

The full path of the script to render

Value

A list containing details about the operation's outcome:

If rendering is successful, the list includes:

  • `success`: TRUE

  • `report_name`: The name of the report file.

  • `filepath`: The full path to the report.

If rendering fails, the list includes:

  • `success`: FALSE

  • `logfile`: The full path to the log file.

  • `error`: Error message returned from quarto_render.

Examples

if (FALSE) { # \dontrun{
script_path <- here::here("report", "quarto_html_example.qmd")
render_results <- render_report(script_path)
} # }