Save source code when R studio hangs

Hi RStudio Community!

So I'm wondering if it's possible to save source code changes (within a .R file) in the RStudio IDE after R hangs or is taking too long to complete a computation?

On rare occasions I have R hang or an analysis idea turns out to be too computationally costly and the IDE will no longer save changes to the source code once a computation has begun but not yet completed. In these cases, I lose my notes on what not to do, which are important to me.

Thanks and best!

When this is happening, and I think I'll be losing the code, I select all and then copy and paste it into something else ... usually Notepad ++ ... after you've restarted RStudio, you can paste the whole thing back and save it.

Yeah that's a great idea, and something I've done too when I continue to code while waiting for a computation to finish. I just wish that saving text files was available in RStudio after submitting source to R. It seems like this would be straightforward.

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