[R] save.image() error

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Sun Apr 7 13:25:26 CEST 2002


On Sat, 6 Apr 2002, Marc R. Feldesman wrote:

> Running 1.4.1 (Windows) under Windows XP Pro.  Have had no difficulty for
> several weeks since moving to the new OS.  Today, while checking the
> behavior of my mouse, I loaded Rgui as usual.  I then immediately tried to
> exit the program.  Upon exiting, I got the following message:
>
> Error in save.image(name) : image could not be renamed and is left in .RDataTmp
>
> I can move the .RData file to any other machine and use it without
> difficulty, which suggests that the file itself is not corrupt.  Since I
> didn't do anything (that I'm aware of) to precipitate this error -- I
> haven't installed or updated any packages for a few weeks -- I'm a bit
> baffled by the error.
>
> What is its cause and what are the suggested "cures".

R 1.4.x saves the image as a temporary file, and then renames it to
.RData.  This is a precaution against wiping out a saved workspace
and then being unable to write out the current workspace, say from lack of
file space.

This mechanism can be over-ridden: see ?save.image.

In your case file.rename has failed.  Now file-renaming works better
on Unix than on Windows, and if Windows has the file open (or thinks it
has) it cannot be renamed.  So if you did this immediately, before the
command prompt had come up, from the menu or x button, you might get
a race condition.  (I've tried to reproduce that, but I can't even on my
slowest machine.)  It's not unknown for Windows to get confused and
need to be re-started (log out and in again on NT/2000/XP) to allow
files to be deleted.

The only known problems with using XP Pro are colour schemes (which are
not used as documented in even the latest SDK), and the need for a
manifest to get the XP version of the common controls (and there is one on
CRAN).  Both are resolved in R-devel, 1.5.0-to-be.

-- 
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