I have installed anaconda and the conda package R on my mac os x yosemite. When I type
which R
in my terminal, I get the following output
/Users/giovannisoldi/anaconda/bin/R
so it is actually linking to the right version. However, when I open RStudio, I can see that the old version of R located in
/Library/Frameworks/R.framework/Versions/2.15/
is still used. I tried to link to the current version of R in Anaconda, with the following command:
ln -sfhv /Users/giovannisoldi/anaconda/bin/ /Library/Frameworks/R.framework/Versions/Current
However, by doing this RStudio complains that it can't locate R.
Is there a way to solve this issue?
Here's how I did it:
which R
/Users/admin/anaconda/bin/R
In my ~/.bashrc
(or your ~/.bash_profile
) I put this:
export RSTUDIO_WHICH_R=/Users/admin/anaconda/bin/R
Then source ~/.bashrc
(you now have to open RStudio from the terminal) finally, you can type
rstudio
or you can, again, edit your ~/.bashrc
with alias rstudio='open -a RStudio .'
and now the rstudio
command will open RStudio in your current dir.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With