Heads up - this has been cross-posted at StackOverflow about two weeks ago with no response.
I have been thoroughly searching for answers to this issue which have plagued me for a long time but have not found any solutions. As the problem is random by nature, I can unfortunately not give a minimal reproducible example.
In R notebook (run interactively within R Studio) I sometimes encounter the following error:
cannot open compressed file '/home/my_user/.rstudio-desktop/notebooks/6CD068F3-my_analysis/1/6C3E483C332D2BCE/c3ijbz2c9hida_t/_rs_rdf_5924697c2a9a.rdf', probable reason 'No such file or directory'Error in gzfile(file, "wb") : cannot open the connection
Observations on the issue:
- This error appears seemingly randomly, meaning that a part of the code might run well first, but then suddenly this appears with no code change
- When this has appeared, I can no longer run any commands until I have restarted the R session
- This error occurs when I am working with relatively large datasets (~100MB)
- Things work fine again after restarting the R session, and generally I can run through the analysis if running it in "one go"
- The issue tends to appear when rerunning certain parts of the analysis repeatedly (for example to debug some specific part of the analysis)
Additional observation - I am often debugging the code using the browser() statement, and it is not uncommon that this issue appears after spending some time interactively debugging.
Any input on this hair-pulling issue would be highly appreciated.