QCDIS / NaaVRE-flavors

Flavors of NaaVRE
Apache License 2.0
0 stars 0 forks source link

Import renv file from R studio to NaaVRE #24

Open skoulouzis opened 2 months ago

skoulouzis commented 2 months ago

Users that use r-studio have their environment setup. Conda don't always have the same packet versions as in CRAN. Renv generates a renv.lock file https://rstudio.github.io/renv/articles/renv.html. We can use that file to port environments from r-studio to naavre

NIOZ-QingZ commented 2 months ago

I tried to install renv and run it within NaaVRE, but it is not straight forward. For one, when renv is initialized, renv create its own lib.path, which seems to mess up the library path of conda. Secondly, downloading R package from CRAN using renv failed (devtools as example).

It seems the most stable way of downloading R package is still via anaconda, but I wonder why. Is it because Jupyter notebook R kernel only support R packages distributed on conda but not CRAN? If it is the case, then it has no added value to use renv as environment management, as it by default download R packages mostly from CRAN.

For rstudio I found this issue on how renv and conda environments can be used together, but I am not sure if this is supported by jupyter notebook.