[R] is auto-save possible?

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Nov 13 09:13:05 CET 2001


On Mon, 12 Nov 2001, Liaw, Andy wrote:

> Dear R-help,
>
> This is just a wishlist item:  Is it possible at all to make R (optionally)
> automagically do save.image() periodically (e.g., every fixed number of
> commands or >= fixed amount of time)?

It's not possible currently, but it has been mentioned as a possibility.
Ideally one would do it by time, but that needs a concurrent operation.
It would be safest to save only at the top-level prompt (and make more
sense given that the objects are most likely to be complete), but then
there would be no saves during loops.

> The reason I asked is that I frequently run R-1.3.1 inside XEmacs 21.4.5/ESS
> 5.1.19 under WinNT, and had seen Rterm.exe crashed a few times for no
> apparent reason (and not reproducible).  When that happens, I lost all the
> objects created in that R session and had to re-run the script (which could
> be time consuming).  At one time R crashed right in the middle of quitting,
> which corrupted the .Rdata file.  Luckily I had a backup that was fairly
> recent that I didn't loose everything.  (Admittedly, auto-save wouldn't help
> this last problem though.)

That's also on the agenda.  Most word-processors do something like save
the file to another name, then rename the files in a non-interruptible
operation.  The problem there is that one needs double the diskspace,
temporarily, so we would need a means to switch this one or off.

Several things are going on re saves.  There is a new, more compact,
format for 1.4.0, we are planning to allow compression, saving over
connections, ....


For now, I would arrange to call save.image() (or save on the critical
files) at strategic points in the calculation).


As someone said recently on S-news, it is sometimes (often?) Windows that
crashes, not R (or S-PLUS).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list