I am trying to get me and my colleagues started on using renv. I have found different pieces of information of what should/can be committed to git for collaboration:
- the renv collaboration vignette suggests to not only commit the
renv.lock
, but also the.RProfile
andrenv/activate.R
- it is however possible to only commit
renv.lock
Apparently there was also some discussion from the developers on which strategy to use.
In general (and coming from pyhton, where basically a requirements.txt
is sufficient), I quite like approach 2. Are there any drawbacks to it? Any changes in what the collaborator then has to do (e.g. start with renv::restore
or with renv::init
)?