Re: [R] Set window title for plot on any OS

2013-07-14 Thread Simon Zehnder
Haha, good point! So, the correct code is: any(names(formals(getOption(device))) == title) { dev.new(title = title) } Thanks for correcting my approach Rolf! Best Simon On Jul 14, 2013, at 1:02 AM, Rolf Turner rolf.tur...@xtra.co.nz wrote: I think you ought to take a look at

Re: [R] Set window title for plot on any OS

2013-07-14 Thread David Winsemius
On Jul 14, 2013, at 3:42 AM, Simon Zehnder wrote: Haha, good point! So, the correct code is: any(names(formals(getOption(device))) == title) { dev.new(title = title) } This might be easier to read: title %in% names(formals(getOption(device)) ) -- David. Thanks for

[R] Set window title for plot on any OS

2013-07-13 Thread Simon Zehnder
Dear R-Users, I am writing a package using S4 classes. In the generic method plot I want to set the title for the plotting window as I will have several windows and window titles help the users to distinguish the graphics without putting a title into the plot itself (this can be done by users

Re: [R] Set window title for plot on any OS

2013-07-13 Thread Duncan Murdoch
On 13-07-13 1:33 PM, Simon Zehnder wrote: Dear R-Users, I am writing a package using S4 classes. In the generic method plot I want to set the title for the plotting window as I will have several windows and window titles help the users to distinguish the graphics without putting a title into

Re: [R] Set window title for plot on any OS

2013-07-13 Thread Simon Zehnder
Hi Duncan, thank you very much for your advice! That makes it all work. I check in addition for a title argument in the device via if (any(names(getOption(device)) == TRUE)) { dev.new(title = title) } Thanks again! Simon On Jul 13, 2013, at 2:40 PM, Duncan Murdoch

Re: [R] Set window title for plot on any OS

2013-07-13 Thread Rolf Turner
I think you ought to take a look at fortune(Lewis Carroll) cheers, Rolf Turner On 14/07/13 01:45, Simon Zehnder wrote: Hi Duncan, thank you very much for your advice! That makes it all work. I check in addition for a title argument in the device via if