[R] Lost all script

Duncan Murdoch murdoch at stats.uwo.ca
Wed Oct 28 16:50:14 CET 2009


On 10/28/2009 11:37 AM, David Young wrote:
> Hi all,
> 
> I just had a rather unpleasant experience.  After considerable work I
> finally got a script working and set it to run.  It had some memory
> allocation problems when I came back so I used Windows to stop it.
> During that process it told me that the script had been changed and
> asked if I wanted to save it.  Not being positive that I'd saved the
> very last changes I said yes.  Now when I turn on R again the script
> is now completely blank.

Are you sure you're looking at whatever file was saved?  You may be 
looking at a different file.

If you really did lose your content, then I think the usual general 
advice applies: don't kill a process that contains unsaved data, because 
you might lose it.
> 
> I guess my questions are:
> Is there a way to interrupt a program without using Windows?

Hit the escape key.  R checks for that at regular times, and aborts 
calculations.  It is possible to run things that don't do the checks, so 
it isn't guaranteed to work.

> Is there anyway to recover my script?

Recover it from a backup.  Use a version control system so that you have 
backups routinely on request (and remember to request it), or a backup 
system like Time Machine on MacOS so you have hourly backups automatically.

> And a nice to know:
> Anybody know why it saved blank space as the new script?

No, but if you can make it happen reproducibly when it shouldn't, we'll 
try to fix it.

Duncan Murdoch

> 
> Thanks for any advice.
> 
> A humble, and humbled, new R user.
> 
> 
> 
>




More information about the R-help mailing list