Sage-Bionetworks / NF_LandscapePaper_2019

This repository hosts all the code used to generate analyses and figures for the landscape paper
3 stars 1 forks source link

init renv for this project #46

Closed allaway closed 4 years ago

allaway commented 4 years ago

Here are instructions copied from the renv collaborating vignette on how everyone can use this to keep the same versions after you sync up with this PR:

After your collaborators have received your renv.lock lockfile, they can then also execute renv::init() (or renv::restore()) to automatically install the packages declared in that lockfile into their own private project library. By doing this, they will now be able to work within your project using the exact same R packages that you were when renv.lock was generated.

For more information on collaboration strategies, please visit environments.rstudio.com.

Updating the Lockfile While working on a project, you or your collaborators may need to update or install new packages in your project. The workflow remains the same as before – after installing these new packages, you can share the updated lockfile with your collaborators, and request that they execute renv::restore() to synchronize their library with the lockfile.

A bit of care needs to be taken if your collaborators attempt to update packages independently. It is recommended that a single ‘source of truth’ is used for the package sources and renv.lock, to avoid different collaborators ending up with different lockfiles – or even, different versions of the project sources!

The simplest way to guard against this is to use a version control system, and have all collaborators work off the same branch. This way, if someone needs to update renv.lock in the public repository, all collaborators will see that updated lockfile and will gain access to it next time they pull those changes.

Closes #45

allaway commented 4 years ago

To do this i just ran renv::init()