Best practice to share scripts on network drive

Hi

I'm not a data scientist but have been learning r for a while now. I created some useful scripts that others in my group would like to use. They don't even know what r is. I've asked them to install r and rstudio. The scripts are on a network drive and using a project file and the here package everyone should be able to run it assuming they have the required packages installed. As they know nothing about r I was originally going to tell them how to install packages. I was wondering is there a better way to manage packages across multiple users? For example having the packages in the project folder and then source them? Or maybe using the renv package?

Thanks

The renv approach may be useful if you can convince your collaborators to buy into a project-centric approach. That is:

  1. The project containing your scripts is managed by renv;
  2. Collaborators are able to open that project, and enter the appropriate renv context upon opening the project,
  3. Users can then source the requisite files.

This is, admittedly, cumbersome for the simpler cases. We're currently investigating ways we can make it easier to share stand-alone reproducible R scripts with renv.

(You might also want to check out https://groundhogr.com/)

Thanks a mill

Renv seems to do exactly what's required and my team can now run the script

Fantastic -- I'm glad to hear it!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.