Install R & Rstudio in CLI on Mac

Install R & Rstudio in CLI on Mac

Install homebrew

Homebrew is awesome, since you can just install things wtih your terminal, like yum, apt-get in Ubuntu.

First, turn on your terminal. If you didn’t install homebrew yet, just copy & paste the following script.

1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

or you already installed homebrew, just update it.

1
brew update && brew upgrade

Install R & Rstudio

You gotta extend the respositories by installing Cask. Just don’t be cared, follow the steps of each line.

1
2
3
4
5
6
7
8
9
10
brew tap caskroom/cask
brew install brew-cask
brew install Caskroom/cask/xquartz
brew cask install java
brew tap homebrew/science
brew install R
brew install Caskroom/cask/rstudio

Then, you can get this.

  • note
    • While you got into several steps, it would bootstrap. It could take more than an hour sometimes. Don’t be panic, and take a cup of coffee reading some posts in Facebook or some.

R for Mac

Rstudio for Mac

How to install R & Rstudio

Shiny in Rstudio

Share Comments