Re: [R] automatically calling dev.off()

2015-09-01 Thread axionator
Yes, it's a different model, but maybe my main problem is that Rserve does not handle addTaskCallback as in the console (and thus no dev.off() is called). On Tue, Sep 1, 2015 at 5:00 PM, Duncan Murdoch wrote: > On 01/09/2015 10:13 AM, axionator wrote: > > Yes, the user could add something. Here,

Re: [R] automatically calling dev.off()

2015-09-01 Thread axionator
Yes, the user could add something. Here, In about 90% of the time, he won't. So it would be nice to have a dev.off() as default (and some extra handling if more plot commands will follow). On Tue, Sep 1, 2015 at 4:04 PM, Duncan Murdoch wrote: > On 01/09/2015 7:34 AM, axionator wrote: > > Hi, > >

Re: [R] automatically calling dev.off()

2015-09-01 Thread axionator
I did it on the console only for testing. I have a program that uses Rserve and would like to have it therefore. (the program basically provides a terminal where you can type in R commands. Since plotting is only possible via files (when using Rserve) that are then displayed in a widget, I like to

Re: [R] automatically calling dev.off()

2015-09-01 Thread Duncan Murdoch
On 01/09/2015 10:13 AM, axionator wrote: > Yes, the user could add something. Here, In about 90% of the time, he > won't. So it would be nice to have a dev.off() as default (and some > extra handling if more plot commands will follow). That's a different mental model of how graphics should work, a

Re: [R] automatically calling dev.off()

2015-09-01 Thread Thierry Onkelinx
Have a look at the implementation of ggsave in the ggplot2 package. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the s

Re: [R] automatically calling dev.off()

2015-09-01 Thread Jeff Newmiller
If you are implementing your own interactive graphics device by creating files, then I would expect you to want to leave all files closed between graphics operations so your widget can interactively update as the user makes graphics calls. However, I have not done this, so could only suggest tha

Re: [R] automatically calling dev.off()

2015-09-01 Thread Duncan Murdoch
On 01/09/2015 7:34 AM, axionator wrote: > Hi, > is there a way to automatically call dev.off()? > I use options(device="myfunc") to automatically open a device to print to. > Afterwards, I would like to close it (so that the file is actually written). > I tried to do it via addTaskCallback, but unf

Re: [R] automatically calling dev.off()

2015-09-01 Thread Jeff Newmiller
Don't use options to do this in batch mode. Open and close the file as you make the plot. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

[R] automatically calling dev.off()

2015-09-01 Thread axionator
Hi, is there a way to automatically call dev.off()? I use options(device="myfunc") to automatically open a device to print to. Afterwards, I would like to close it (so that the file is actually written). I tried to do it via addTaskCallback, but unfortunately, I have to use Rserve and (for any reas