且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何告诉RStudio使用Anaconda的R版本

更新时间:2023-09-27 08:19:58

这是我的操作方式:

which R
/Users/admin/anaconda/bin/R

在我的~/.bashrc(或您的~/.bash_profile)中,我输入了以下内容:

In my ~/.bashrc (or your ~/.bash_profile) I put this:

export RSTUDIO_WHICH_R=/Users/admin/anaconda/bin/R 

然后source ~/.bashrc

(现在您必须从终端打开RStudio),您可以输入

(you now have to open RStudio from the terminal) finally, you can type

rstudio

或者您可以再次使用alias rstudio='open -a RStudio .'编辑~/.bashrc,现在rstudio命令将在当前目录中打开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.