[Rd] Saving nothing with save()

From: Barry Rowlingson <b.rowlingson_at_lancaster.ac.uk>
Date: Sun, 18 Dec 2011 01:32:52 +0000

Scenario: Here I am working away in R. I've got results that prove global warming is anthropogenic and also the solution for producing limitless carbon-neutral energy from nuclear fusion. Its been a good day.

So, I want to save my work. I don't want to overwrite my current .RData, so I save it to another file:

save(file="prize.RData") # just need to email this to the Nobel committee q()
  Save workspace image? [y/n/c]: - "no" I don't want to save the workspace image, I just saved everything to "prize.RData". But gee, it did seem to do that quite quickly considering the volume of evidential
data in my work. My unix shell prompt returns.

Uh oh. See what I did there? I typed 'save' when I meant 'save.image'. What does that give me?

 A 42 byte, empty, latest.RData, and because there was no warning or error I quit without saving it again. Oops. Massive Data Loss.

 Is there any reason why save(file="file.RData") couldn't warn or error if you try and save nothing? There's no obvious check in the R code for save.


PS the above scenario is fictional. When did I last have a good day?

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 18 Dec 2011 - 01:36:03 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 19 Dec 2011 - 11:50:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive