[R] dev.off(): is there a 'quiet'-mode?

Duncan Murdoch murdoch.duncan at gmail.com
Thu May 13 00:19:47 CEST 2010


On 12/05/2010 6:09 PM, Marius Hofert wrote:
> Dear R experts,
>
> On shutting down a device with dev.off(), the number and name of the new active device is returned/printed. How can this be prevented from being shown? Is there something like a 'quiet'-mode?
Like any other expression, if you assign the result to a variable, it 
won't be printed.  So

x <- dev.off()

would work.

If you don't want to waste a variable name, you can achieve the 
non-printing by wrapping the call in invisible():

invisible(dev.off())

will return the result with printing turned off.

Duncan Murdoch



More information about the R-help mailing list