R/render_decision_qmd.R
render_decision_qmd.RdThis function takes a QMD file generated by generate_decision_qmd() and renders it to the desired output format (HTML, PDF, or Word). It uses the quarto package to perform the rendering, allowing for flexible output options and integration with Quarto's rendering capabilities.
render_decision_qmd(qmd_file, output_format = c("html", "pdf", "docx"), ...)Character scalar path to the QMD file to be rendered. This should be the output from generate_decision_qmd().
Character scalar specifying the desired output format. Options are "html",
"pdf", or "docx". The default is "html". The function will call quarto::quarto_render() with the appropriate format based on this argument.
Additional arguments to pass to quarto::quarto_render(),
such as output_file to specify the output file name and location, or execute_params to control code execution during rendering. These allow for further customization of the rendering process.
Invisible NULL. The function is called for its side effect of rendering the QMD file.
if (FALSE) { # \dontrun{
# Render a QMD file to HTML (default)
render_decision_qmd("path/to/decision_report.qmd")
# Render to PDF format
render_decision_qmd("path/to/decision_report.qmd", output_format = "pdf")
# Render to Word with custom output file name
render_decision_qmd(
"path/to/decision_report.qmd",
output_format = "docx",
output_file = "my_report.docx"
)
} # }