renv puts all packages into project's renv/library

January 22, 2020 @Nefcairon

@Nefcairon wrote:

Hello,

We are a small team that uses RStudio/R on windows 10 machines with shared network drives. Our R projects are on such a shared network drive so that everyone can access them. I recently discovered renv and thought that that would be useful for us.

I think it would be a good idea to keep all packages (normal installs from CRAN repo) in a folder on the shared network drive. So I have set RENV_PATHS_ROOT = "A:/ ... /external" in my Rprofile.site but when I install a package, it is not only put there but also into the projects "renv/library" folder. That results in the fact that all projects are relatively large as they contain all the packages. To my understanding the packages should be only kept in one central place (is this refered to as the renv cache or as renv global?)

So my question is:
What has to be done so that the packages are not stored individually per project?

BTW, I have found different information on the renv github pages:

https://rstudio.github.io/renv/articles/renv.html
"If you’d like to share the package cache across multiple users, you can do so by setting the RENV_PATHS_CACHE environment variable to a shared path."

https://rstudio.github.io/renv/reference/paths.html:
If desired, this path can be adjusted by setting the RENV_PATHS_ROOT environment variable. This can be useful if you'd like, for example, multiple users to be able to share a single global cache.

Thanks for your help in advance!

Posts: 3

Participants: 2

Read full topic

Previous Article
rstudio launcher is not working. Throwing error: [rserver] ERROR Cannot connect to the Job Launcher service
rstudio launcher is not working. Throwing error: [rserver] ERROR Cannot connect to the Job Launcher service

@diegop wrote: Hi I'm trying to setup launcher service in my rstudio server inst...

Next Article
renv::restore() in Docker fails to restore packages
renv::restore() in Docker fails to restore packages

@dwhdai wrote: (topic withdrawn by author, will be automatically deleted in 24 h...