Re: R-alpha: saving workspace

George White (
Mon, 10 Feb 97 12:13:01 AST

Message-Id: <>
From: George White <>
Subject: Re: R-alpha: saving workspace 
To: (Martyn Plummer)
Date: Mon, 10 Feb 97 12:13:01 AST
In-Reply-To: <>; from "Martyn Plummer" at Feb 10, 97 3:57 pm

> At 14:14 10/02/97, wrote:
> >Maybe I'm just going blind, but I can't seem to locate a command that
> >saves the workspace without terminating the current R session.
> What about save(list=ls(),file=".RData.bak")? You can read the data back
> in with the load function. (I think you can even substitute .RData.bak for
> .RData)
> >I probably won't need to expand on why that would be useful to have?
> Even more useful if it happened automatically.

More generally, the range of things that can be done in R would be 
greater if there was a simple scheduling mechanism.  Is there a way
to have a specific function invoked just before the command prompt
returns after a function?  Such a function could be used to run
save(...) or check for various external cues (update of a file's
timestamp) to control an analysis.  

I doubt it would make sense to have full context switching in R,  but
perhaps save() could be done in a way that would allow it to be used
even in a long calculation under some timer control.  I expect the 
user would need to provide a list of the data objects that need to be 

  George N. White III                | Internet: <>
  Department of Fisheries and Oceans | DFO email:
  Ocean Sciences Division            | Time Zone: Atlantic (AST4ADT)
  Bedford Institute of Oceanography  | phone: (08:00-16:00)
  P.O. Box 1006                      |     902.426.8509 (office)
  Dartmouth, Nova Scotia             |     902.426.9388 (FAX)
  CANADA               B2Y 4A2       |     902.426.3793 (emergencies)

r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: