I work on a number of RStudio projects that manage their dependencies with
renv. By and large this works swimmingly (although some of them seem to install a suspiciously large number of packages). The problem I keep running into is that my 'base' RStudio environment (i.e. without any actively loaded project) seems to keep forgetting or losing its installed packages.
I don't know how to go about providing a reproducible example for this but what'll happen is that I'll be in a project with renv that has the tidyverse installed. Then I want to mess around with something outside the project environment so I either close the project or start a new instance of RStudio with no active project. In some indeterminate number of cases, that base RStudio environment will tell me that packages I definitely installed are no longer installed.
This definitely seems to result from switching back and forth between renv-managed and non-renv-managed environments but I can't figure out why it's occurring. Has anyone else seen anything like this?