Rstudio Is Duplicating Commands in the Command Line

Persistent warnings from earlier commands with RStudio

Answer by zeehio.

This is an issue with the Diagnostics tool in RStudio (the tool that shows warnings and possible mistakes in your code). It was partially fixed at this commit in RStudio v1.1.103 or later by @kevin-ushey. That fix was partial, because the warnings still appeared (albeit with less frequency). This issue was reported with a reproducible example at https://github.com/rstudio/rstudio/issues/7372 and it was fixed on RStudio v1.4 pull request.

The warnings appear because the diagnostics tool in RStudio parses the source code to detect errors and when it performs the diagnostic checks it accesses columns in your tibble that are not initialized, giving the Warning we see. The warnings do not appear because you run unrelated things, they appear when the RStudio diagnostics are executed (when a file is saved, then modified, when you run something...).

edit RStudio project options from command line

When RStudio creates a project named foo, it creates a file called foo.Rproj, which is actually a text file, containing several project options. By default, there's nothing there about executing .Rprofile, but if someone checks the box you've marked in your question, they'll get a line

DisableExecuteRprofile: Yes

in that file. If you delete that line you'll effectively uncheck the box. This appears to work even if the user has the project open, though not if they have the dialog open to set the option.

Edited to add: this is explicitly allowed, according to this message: https://community.rstudio.com/t/editing-rproj-files-from-the-console/31800 .



Related Topics



Leave a reply



Submit