Possible to recover lost Rmd file?

A student contacted me that they were working on a homework assignment when there was some error, and they lost all their work in progress. I can see from the History tab that they did do a lot of work, but the Rmd file is back to the initial state as I originally assigned it. Is there any way for them to recover the work they did?

The project is https://rstudio.cloud/spaces/44644/project/1124278

Thank you!

Hi,

We're working on fixing the issues surrounding making sure unsaved files are preserved even in the event an R session crash. In the meantime, there is an R package which might be able to recover these files for you: https://github.com/jmcphers/rsrecovr

tl;dr:

remotes::install_github("jmcphers/rsrecovr")
rsrecovr::recovr()

to restore all the files in your project.

Please let me know if this works for you. And I apologize for the inconvenience.

Also curious to know what the error they encountered was. It would be great if you could forward a screenshot of the error, if it is available.

I had several students report to me that the error happened when they were knitting the Rmd file to pdf. Their Rmd file now has some random outputs, with almost all of the code-chunks that produced the output completely gone. I have never seen anything like that before. I would not expect the Rmd file to get modified during the knitting process like this. I can see in the History tab that they did do bunch of work (I did not inspect it in details, so I do not know if the work was correct).

The rsrecovr package recovered nothing useful, it created two copies of the original Rmd file form the assignment, with my instructions but otherwise blank.

I will instruct my students to take a screenshot of the error if it happens again.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.