Issue with installed.packages - Endless loop - "Updating Loaded Packages - One or more of the packages that will be updated by installation are currently loaded. Restarting R prior to updating these packages is strongly recommended"

Some RStudio IDE feature and UX are build upon some R :package: . It is why you need them, and they can be loaded just because the IDE is open. I observed this with yaml :package: once, that is use to load the list of Rmd templates available in one of the menu.
It may be the case for knitr: This :package: is the foundation for Rmd functionnality and it is possible the Rmd feature in the IDE are built upon knitr being loaded. Not sure but possible.

In all case, one safest way to update all your packages could also be to not open RStudio for that. You open R GUI or just R at command line and run update.packages() there - nothing is loaded and no risk a conflict.

3 Likes