save_report: Save a report to the outputs directory

View source: R/outputs.R

save_reportR Documentation

Save a report to the outputs directory

Description

Copies or moves a rendered report (HTML, PDF, etc.) to the configured reports directory. The directory is created lazily on first use.

Usage

save_report(file, name = NULL, public = FALSE, overwrite = TRUE, move = FALSE)

Arguments

file

Path to the report file to save

name

Optional new name for the file (without extension). If NULL, uses original name.

public

If TRUE, saves to public outputs directory (for project_sensitive type)

overwrite

If TRUE, overwrites existing files (default: TRUE)

move

If TRUE, moves the file instead of copying (default: FALSE)

Value

The path to the saved file (invisibly)

Examples


if (FALSE) {
# Save a rendered HTML report
save_report("notebooks/analysis.html", "final_analysis")

# Save to public directory
save_report("notebooks/summary.pdf", "public_summary", public = TRUE)
}



framework documentation built on Feb. 18, 2026, 1:07 a.m.