From thomas@biostat.washington.edu  Sat Mar 25 20:16:40 2000
From: thomas@biostat.washington.edu (thomas@biostat.washington.edu)
Date: Sat, 25 Mar 2000 21:16:40 +0100 (MET)
Subject: [Rd] interrupted save (PR#505)
Message-ID: <200003252016.VAA08795@pubhealth.ku.dk>


If an error occurs during a save the file does not appear to be
closed and buffers flushed.  This can lead to corruption if the same
filename is used later and then the buffer is flushed on program exit.

For example, tn the context of PR #504

 f<-function(x,...){ function(y) list(x=x,y=y,...)}
 a<-f(1,2,3)
 save(list="a",file="a.rdata")  ## -- error --
 b<-1:10
 save(list="b",file="a.rdata")
 load("a.rdata")  ## works
 q("no")
 
 R

 load("a.rdata")  ## error



This is R1.0 on Linux

	-thomas

Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] interrupted save (PR#505)
thomas@biostat.washington.edu