It has been done. Did you see the answer of @slopp?
It seems what you want to do is difficult and be a corner case due to conda working behavior. I am like him with all this: I use conda for python only with reticulate
and use R ecosystem directly to deal with package management by project. You have several solution for that (as ) like packrat, jetpack, or rsuite and also helping tools like devtools or remotes. Never had a problem with that, and it allows to have everything available as some are not available through conda.
Per the documentation, you need to define this in a linux user profile (like ~/.profile
. .Renviron
is for defining environment variable for R only, not RStudio. What you want to try here, is indicating RStudio when it starts to use this version of R. As I understood @slopp, it is like having one rstudio server per environment project, as VM. So, if this works for one environment, you need then a mechanism to switch this variable by project. At the end, very challenging.
The post is now in R-Admin channel, we'll see if others feels like you and have some experience.