Renv cache not working. Packages are copied not linked

91 views Asked by At

I am trying to use the R package ‘renv’ for package version control. To avoid the packages being copied numerous times I am trying to make use of the cache. However I am failing to get this to work.

I have set RENV_PATHS_ROOT to point to the cache location (containing 118 libraries).

and I am using the following code:

#   Set Prog Options   # 
name_version  <- "1.0"     # version of program 
name_prog     <- "prog_shell" # name of program (without version number)

# Create local environment  # 
renv::settings$use.cache(TRUE) #Edit settings to use cache 
renv::paths$cache() #Check location of cache is correct

options(renv.config.cache.symlinks=TRUE)

#Initiate 
renv::init() 

#Libary Loading 
library(tidyverse)
library(ggplot2)
#etc.....

# ANALYSIS #

#Close renv
renv::snapshot()

I have seen a similar question here. My packages and projects are not stored on the same drive as this has caused package loading to be incredibly slow. This means that the approach mentioned will not work for me. I think that this may be what is causing the packages to copy rather than link, is there a good work around for this?

0

There are 0 answers