On Tue, Jun 30, 2009 at 11:45 AM, Barry Rowlingson<b.rowling...@lancaster.ac.uk> wrote: > On Tue, Jun 30, 2009 at 6:33 PM, Ted > Harding<ted.hard...@manchester.ac.uk> wrote: > >> Barry, spot on! If there were a prize for postings with >> simplicity, clarity, conciseness and usability, I would nominate >> yours (especially in the "Why didn't *I* think of that?" category). > > Thanks Ted! > > It's just a shame dev.new() doesn't return the device number, since > that would make things even simpler: > > # does not work like this: > xyPlot = dev.new() > histPlot = dev.new() > > Instead it returns whatever the device function (X11,png,postscript > etc) returns, and they all seem to return NULLs. I suppose in the > future a device function might return something useful. > > Barry >
You could wrap it in a function of your own making, right? AddNewDev = function() {dev.new();AddNewDev=dev.cur()} histPlot=AddNewDev() Seems to work. - Mark ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.