I just had a rather unfortunate experience and i'm not entirely sure whether its a R or Rstudio issue.
On my plain old local disk running Windows10, Rstudio 1.1.456 and R 3.5.1 - I was creating a gif using the magick package when I got an error saying something along the lines of 'file not reachable' and then when I closed Rstudio the .R file inside my project got completely wiped of all code and I now have an empty .R file even though the file itself still exists inside my project directory. I'm absolutely positive that I did not delete or move the file and somehow the troubles seemed to start when I tried to save the gif I created with a .mp4 extension.
I couldn't restore windows to an earlier point so I guess my chances of getting my code back are slim to none.
But do anyone have a clue what went wrong? and perhaps suggestions for getting my code back?
wow, that's really wild. I have not run into anything like this, but debugging is going to be hard because, by definition, you can't post the code that caused the problem. Which makes it hard to reproduce.
Are you running any background file monitoring software like OneDrive or GoogleDrive? Sometimes they produce file history that allows rolling back changes.
Hello,
I had exactly the same problem. I'm to R and Rstudio, so my code is extremely simple, but sometimes, it justs kind of disappear !
I still have the file, but it's completly clear of my code.
I have also Rstudio version 1.1.456 and R 3.5.1. I tried with anaconda distribution, and experienced the same issue...
So I edit the file with a text editor (Notepad++), they were blank. I retyped my code in that editor, and open it in Rstudio. It works for few minutes, and go blank again !
What is extremely strange is that I kept open the file with my text editor, I still have the code, but in Rstudio, it's blank ! I closed Rstudio, restart it, re-open the file, and it's blank !!
Rstudio just won't read that R file anymore...
A diagnostics report could potentially be helpful -- if we're luck, some kind of warning / error may have been logged at the time when the file contents were lost.
Are you using any 3rd-party cloud synchronization services (e.g. Dropbox)? Can you think of anything that might make your environment unique relative to a typical at-home desktop environment?
R Studio also deleted the contents of all files that had previously been open on my computer. I had saved my files a number of times, but this morning when I opened R all of the files that had previously been open were entirely blank. Luckily files that were not open were not wiped, but I would like to avoid this problem in the future. I joined R Studio Community to report this and see if I could find out what happened. I am also running Windows 10 and I have R Studio version 3.5.0.
Unfortunately those entries in the diagnostics report are most likely unrelated to whatever might have occurred.
Are you using any 3rd-party cloud synchronization services (e.g. Dropbox)? Can you think of anything that might make your environment unique relative to a typical at-home desktop environment?