Skip to content

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

3 messages · Marius Hofert, Duncan Murdoch, (Ted Harding)

#
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?

Cheers,

marius
#
On 12/05/2010 6:09 PM, Marius Hofert wrote:
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
#
On 12-May-10 22:09:18, Marius Hofert wrote:
I don;t know about a specific "quiet mode", but try the following:

  Dev.Off <-function(which=dev.cur()){ dummy<-dev.off(which) }
  X11()     ## Or whatever you use to get a new window
  Dev.Off()

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 12-May-10                                       Time: 23:21:36
------------------------------ XFMail ------------------------------