[R] Corrupt .RData

David Brahm brahm at alum.mit.edu
Tue Dec 11 16:30:15 CET 2001

In response to Alex Ploner's <ploner at stat.boku.ac.at> question about lost data
from a corrupted .RData, Andy Liaw <andy_liaw at merck.com> wrote:
> One other preventitive meaure (other than back up often) could be, e.g.,
> saving "valuable" objects (large data, or objects that takes a long time to
> reproduce) that will only be referenced rather than modified in separate
> files that can be load() or attach().

I can't resist plugging my CRAN package "g.data", which does this sort of thing
for you, especially if you have many large objects to store but only expect to
use a few at a time.  Essentially:
   R> g.data.attach("/my/storage/area")
to access existing objects (in position 2), and then:
   R> assign("a.valuable.object", big.object, 2)
   R> g.data.save()
to put new ones there.  Better than hundreds of save()'s and load()'s, IMHO.
                              -- David Brahm (brahm at alum.mit.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