This document explains how to install R and RStudio with Homebrew on Mac OS. Main Instructions The steps below will install Homebrew, R, and RStudio. Open a terminal and run the following commands. Install Homebrew. usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" This command will download, install, and set up Homebrew. The first time a brew command runs it will ask for a password. Install R with the following commands: brew tap homebrew/science # adds another source for applications.