I'm encountering some really odd behavior with rstudio version 1.0.136
and r version 3.3.2
, which unfortunately does not lend itself to a reproducible example.
Whenever I force quit an rstudio project, I start getting these weird phantom error messages as thought rstudio is trying to run code which is not longer present in the project. This happens whenever I type anything in a saved script in the editor.
Does anyone have any thoughts about how I might identify the root cause of this error? Or alternately how I could completely delete everything rstudio knows about the pre-crash project?
Updates
It is somewhat code independent and has happened on a few projects. I don't actually see the code which it is trying to run, but only the error message which results, which is typically trying to load a file which doesn't exist, or calling a function which hasn't been loaded into memory. I tried the following things:
.rproj
file and starting a new project in the same folder (no change)R
(no change)RStudio
(no change)Sierra
(no change)RStudio
and Rstudio desktop directory
according to these instructions: https://support.rstudio.com/hc/en-us/articles/200554736-How-To-Uninstall-RStudio then reinstalling (Did not fix)RStudio
, when I run it in an untitled file it works. Similarly when I run it in a base R
console it works. So I think what's going on is that when RStudio
quits unexpectedly, there's some reference to the initial file which is loaded by the loading R
files at startup.
Edit
Related errors: https://support.rstudio.com/hc/en-us/community/posts/220481907-Phantom-error-messages-on-RStudio
Based on your description of the problem it seems that Rstudio is trying to run a code that does not exist or depends on packages that are no longer installed. But if the errors only happen when you start typing, it might be due to code diagnostics that runs in the background which is triggered as you type.
try to navigate to tools -> global options -> code -> diagnostics and uncheck the following:
Inrstudion 1.3
and newer, you can further set the background_diagnostics
false
by modifying the rstudio-prefs.json
file. It can be found in AppData/Roaming/RStudio
on Windows and ~/.config/rstudio
on other systems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With