renv: Restoring packages in R project on shared mapped drive

Hello,

This question is similar to one already posted on the Posit Community (renv puts all packages into project's renv/library).

We are a small group of analysts who use RStudio/R on both Windows and Mac operating systems with a shared network drive. We currently do not have the infrastructure to expand into larger, corporate environments so we use a shared network drive that everyone can access both on-premises and remotely. In addition to using git to track versions of files, we are interested in renv to create reproducible environments for our R projects.

The renv package documentation has been easy to follow, specifically the use of renv::init() to convert a project to use renv. However, although packages were successfully copied to the project library and the lockfile was updated, the R project fails to remain in sync and indicates numerous packages are in the project but not installed. This is generally accompanied by a system error that I cannot translate. Further, when attempting to use renv::restore() to restore the project from the lockfile, some packages can never be installed as target files already exist (see example images below).

In an ideal scenario, we would like to retain package histories at the project level that are accessible on the shared network drive. I'm tagging @kevinushey given their history with renv related questions both on Posit Community and Github.


Reloading RStduio after using renv::init() and renv::status()


Using renv::restore() to install project packages on machine


Final outcome of using renv::restore()