Running R from Mac OSX terminal

后端 未结 4 1046
情深已故
情深已故 2021-02-05 21:04

I\'ve searched the web, and I\'m still unclear on how to run R from the Mac terminal. I have Rstudio and the standalone R app installed. I thought I could just type "R&qu

4条回答
  •  深忆病人
    2021-02-05 21:12

    Just ran into the same issue when installing R-4.0.3.pkg on my MacBook (MacOS BigSur). Can open R.app to the clunky R GUI, but typing in 'R' in terminal doesn't work.

    Turns out, an R executable lives here: /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/R

    So I added this alias to my newly created .zshrc script:

    alias R '/Library/Frameworks/R.framework/Versions/4.0/Resources/bin/R'

    Now when I type in R, it opens... I swear this all happened seamlessly in earlier versions.

提交回复
热议问题