Reputation: 1547
I just installed MacOS version of R from the CRAN web site. Within the R GUI application, everything works fine. However, I'm unable to run it from terminal. Trying to trigger R
or Rscript
in terminal yields a message indicating that neither command exists.
Also I do not see corresponded scripts in /Applications/R.app/Contents/
.
How can I run R from terminal?
PS: I know brew installation will help. But I want this version of R from CRAN web site.
Upvotes: 1
Views: 2066
Reputation: 1547
The R installer creates /Library/Frameworks/R.framework/
directory in addition to /Applications/R.app/
.
So, you need add a correct directory to the Library
dir. For my packages:
R_APP_DIR=/Library/Frameworks/R.framework/Versions/3.2/Resources/
export PATH=$R_APP_DIR:$PATH
Upvotes: 1