'RStudio, set relative R path

I'm using RStudio, and I have R in a folder inside the RStudio folder, I want to move this folder to other places to work, but I don't want to install it in every place.

(When we install Rstudio, the dir is "RStudio/bin" where the files are)

When using R in a different folder, I don't need to worry about the library path, R can handle from it self to where it is, and will set the path to where I move the R folder.

The part I can't found, is how can I tell to Rstudio to use a relative path to where the R folder is, like "./R", I know I can set the path in the options, but I'm looking for this.

The env vars of Rstudio help on R libs, but not R it self, maybe there is one, but I wasn't able to find it.

This is for windows.

I'll explain how the folders are structured:

Rstudio/ (Here all the files of RStudio)
RStudio/R (Here all the R files, bin and libs)

I want, when I open the file RStudio/rstudio.exe, to use the R version in RStudio/R, as a relative path "./R" where is the bins and libs.

So if I move the RStudio folder, will keep using the same R folder in the RStudio folder.

Thx.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source