Renders a report's figure and writes it via ggplot2::ggsave(). For
the report as a depositable CSV instead, use write_report().
Arguments
- report
An object of class
instar_report.- path
Output file path. The extension chooses the format;
.pdfor.pngare recommended.- width
Page width in inches. Defaults to 8.5".
- height
Page height in inches. If
NULL(the default), a compact height is chosen from the content, clamped to[6, 11].- dpi
Resolution for raster formats. Defaults to 300.
- value_wrap
Approximate characters per line for the item text. Defaults to the value stored on the report.
- ...
Additional arguments passed to
ggplot2::ggsave().
Details
The default page height is computed from the figure's natural content
size, so the saved file is as compact as the content allows with no
large blank regions. Pass an explicit height to override.
Examples
if (FALSE) { # \dontrun{
rep <- instar_report(instar_template(), list(title = "T", authors = "A"))
save_figure(rep, "welfare_reporting.pdf")
} # }