save_pdf | R Documentation |
Save a list of plots to multipage PDF.
save_pdf(
plots,
output_file,
width = NULL,
height = NULL,
make_thumbnail = FALSE,
stop_on_error = FALSE
)
plots |
A list of plots. |
output_file |
A character scalar: path to output PDF file. If file's directory doesn't exist, it will be created recursively. |
width, height |
A numeric scalar: default width and height of graphics region in inches. Defaults to 7. |
make_thumbnail |
A logical scalar: if |
stop_on_error |
A logical scalar: if |
A named list with the following items:
success
: a logical scalar indicating whether the plot saving succeeded (TRUE
) or not (FALSE
).
error
: a character scalar with error message if success
is FALSE
, NULL
otherwise.
error_plot
: a ggplot2
object with error plot if success
is FALSE
, NULL
otherwise.
output_file
: a character scalar, identical to output_file
parameter.
thumbnail_file
: a character scalar, path to thumbnail PNG file if make_thumbnail
is TRUE
, NULL
otherwise.
Note that success
of FALSE
and the accompanying error message and plot are only possible when stop_on_error
is FALSE
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.