[R] is auto-save possible?
Luke Tierney
luke at nokomis.stat.umn.edu
Tue Nov 13 13:13:29 CET 2001
On Tue, Nov 13, 2001 at 09:49:52AM +0100, Peter Dalgaard BSA wrote:
> Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
>
> > 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.
>
> In principle, tkcmd("after",...) from the tcltk package can schedule
> timed events, but I'm a little unsure what happens if you put
> save.image() inside of it... It might be worth a try, but don't do it
> on valuable data! This should save once per minute (although not
> during computations):
On Windows I think you get it during computations too, for better or
worse, given the way event handling works there.
>
> library(tcltk)
> f <- function() {save.image() ; tkcmd("after", 60e3, f)}
> f()
>
> (One way of stopping it is to remove f)
--
Luke Tierney
University of Minnesota Phone: 612-625-7843
School of Statistics Fax: 612-624-8868
313 Ford Hall, 224 Church St. S.E. email: luke at stat.umn.edu
Minneapolis, MN 55455 USA WWW: http://www.stat.umn.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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