Requisite: How to Install R using Homebrew on Mac OS X?
I use a Mac and I was utterly confused while installing R. I was desperately looking for steps to install R on my Mac. Well, I found two solutions:
1. Using Homebrew – The steps are mentioned below
2. Downloading installation package file from CRAN – I wrote another post on this and the link is here.
Step By Step Solution:
Homebrew is a “missing package manager for Mac OS”. If you are not sure which version of R to download or have questions regarding the compatibility with the OS, or how to download and then install R, Homebrew is a solution which enables installing the correct version after typing a single line instruction. Sounds easy, right? Also, for updating or upgrading the components or the libraries, a single line command is enough. So, below is the step-by-step process to Install Homebrew and then R.
Let’s start!
1. Press Command + Space bar on Mac to open the Search Bar
2. Write “Terminal” and press Enter
3. Once the Terminal is opened, write the below ruby code to install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install R
brew update
brew outdated
brew upgrade