Why isn't RStudio auto installing packages aymore?

So a relatively simple question, usually when you saved an R script that you had opened in RStudio you will get prompted with a banner above the script saying that there are packages not currently installed that are required for that script (or something to that effect). However that is no longer the case, is there any way to force RStudio to check if packages are installed and if not then to install them? Also, What happened to this feature? How can I re-enable it? I've had this issue on 3 different PCs and it is getting really annoying to manually install different packages every time. Thanks!

This isn't an answer to your question per se, but if you're going to be working on the same project across computers I would encourage you to explicitly track its dependencies with {renv}. You can then much more easily restore libraries on a per-project basis. The feature is working on my machine, so you would need to confirm that all your computers are running the same versions of R and RStudio, that the global and user libraries don't contain the packages you're looking for, etc.

Thank you, that is a great recommendation and I will keep it in mind when working on multiple computers.

What version of RStudio are you using?

Is this box checked? (Options -> Code -> Diagnostics)

Thanks for your help! I did not know this was an option, I do have it enabled though. I am also using 1.3.1093 of RStudio. My guess after investigating for a bit is that it may have something to do with where R is installed R 3.6.X was installed in program files where as R 4.0.X is installed in the documents folder (I don't know why this happened as I did the same installation process I always do). Exactly why would RStudio not recognize that there are no packages installed I don't know.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.