The `renv` package (
https://rstudio.github.io/renv/articles/renv.html) allows project-wise package management in R. This is useful when working on multiple R projects with different dependencies, and sharing these environment across users or VMs. In order to be able to use `renv` in the DRE, we had to adjust multiple settings in `Rprofile.site` (located, e.g., at `C:/ProgramFiles/R/R4.0.3/etc/`). The following is working as of 2022-06-20 with R 4.0.3/Bioconductor 3.12, and R4.1.1/Bioconductor 3.14.
This currently allows installing R and Bioconductor packages in RStudio, before and after installing (`install.packages("renv")`) and activating `renv` with `renv::activate()`. It still needs to tested if the project environment can be succesfully restored in the DRE, too (`renv::restore()`).
I'm attaching a copy of my current Rprofile.site and would be happy to hear of others' experiences or suggestions.