dev_suppress | R Documentation |
This function opens a PDF graphics device using grDevices::pdf
to suppress
the plot display in the IDE. The purpose of this function is to avoid opening graphic devices
directly in the IDE.
dev_suppress(x)
x |
lazy binding which generates the plot(s) |
The function uses base::on.exit
to ensure that the PDF graphics
device is closed (using grDevices::dev.off
) when the function exits,
regardless of whether it exits normally or due to an error. This is necessary to
clean up the graphics device properly and avoid any potential issues.
No return value, called for side effects.
dev_suppress(plot(1:10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.