Suppresses plot display in the IDE by opening a PDF graphics device
Source:R/utils.R
dev_suppress.Rd
This function opens a PDF graphics device using pdf
to suppress
the plot display in the IDE. The purpose of this function is to avoid opening graphic devices
directly in the IDE.
Details
The function uses on.exit
to ensure that the PDF graphics
device is closed (using 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.
Examples
dev_suppress(plot(1:10))