on my ubuntu server I have several R installation created by RStudio Server.
That is, there is a /home/user1/R
and a /home/user2/R
.
I now want to run an R command from command line. Usually I just type s.th. like sudo R -e "...."
. However, how can I specify which R installation to be used with that approach?
Whenever I execute the command, the R installation that is used is /usr/local/lib/R
. How can i change this?