vubiostat / Renv

Simple R version management, based on rbenv
MIT License
116 stars 13 forks source link

explicitly explaining setting of RENV_ROOT variable? #5

Open AltfunsMA opened 3 years ago

AltfunsMA commented 3 years ago

I was just confused by things only half working when I cloned the repo outside of my home directory (which has limited capacity). I ended up looking into the code and realised I needed to set the RENV_ROOT variable to the cloned folder. Maybe this is obvious to most people but perhaps could be mentioned in the README?

viking commented 3 years ago

Renv currently expects to be installed in your home area, but as you discovered, you can set RENV_ROOT yourself if you installed it somewhere else. Here's a snippet from the Renv main script:

if [ -z "${RENV_ROOT}" ]; then
  RENV_ROOT="${HOME}/.Renv"
else
  RENV_ROOT="${RENV_ROOT%/}"
fi
export RENV_ROOT

You're right though, this should probably be documented somewhere useful.