Search code examples
robjectenvironmentrestart

Computer restarted while code was running


For a few days now, I have been running a long code on RStudio. I discovered in the morning that during the night, the computer resarted. I know the line where it stopped, because of the files saved on my computer. I would like to keep running the code from where it was interrupted but the environment is now empty - is there a way to "recover" everything? Re-starting from scratch would take so much time...

Many thanks for the help.


Solution

  • There is no way except for modifying the code to start processing data from where it ended.

    In general, if one writes tasks that can run for so long, it's a must to split them to smaller chunks that do not have to be repeated, and write code for saving/restoring the state.