3.3 Downloading and installing R

This section is intended for students who are not going with the Posit / RStudio Cloud option discussed above, and are intending to download and install R and RStudio on your machine. Note that the directions below have you first downloading R and then RStudio. They are two separate programs that work together.

The first step to get R onto your machine is to go to the website, download the correct version of R, and install.

The website is https://www.r-project.org/.

3.3.1 Choosing a Mirror

Since R is open source, there are many different servers around the world where you can download it. You are welcome to choose any mirror (i.e., location) you wish, but you may want to be sure that you know the national language of whichever country you select. I was boring and simply chose a mirror in Pittsburgh, PA because it was closest to my location.

3.3.2 Download and install the correct version

R is available for PCs, Macs, and Linux systems. You will most likely want one of the first two options.7 Be sure to choose the option in the top box that offers Precompiled binary distributions.

For Macs:

  • Click on the “Download R for (Mac) OS X” link at the top of the page.

  • Click on the file containing the latest version of R under “Files.”

  • Save the .pkg file, double-click it to open, and follow the installation instructions.

For PCs:

  • Click on the “Download R for Windows” link at the top of the page.

  • Click on the “install R for the first time” link at the top of the page.

  • Click “Download R for Windows” and save the executable file somewhere on your computer. Run the .exe file and follow the installation instructions.

Once this is complete, you will never need to actually open R. We will be using RStudio to communicate with R - and the next section directs you through the installation of RStudio.

3.3.3 Downloading and installing RStudio

While R is open source, RStudio is a company that sells versions of its Integrated Digital Environment (IDE) to use along with R. In short, it is an easy-to-use interface that makes working with R easier. We will be using the free version of RStudio Desktop which is available here:

https://rstudio.com/products/rstudio/download/

For Macs:

  • Click on “Download RStudio Desktop.”

  • Click on the version recommended for your system, or the latest Mac version, save the .dmg file on your computer

  • Double-click it to open, and then drag and drop it to your applications folder.

For PCs:

  • Click on “Download RStudio Desktop.”

  • Click on the version recommended for your system, or the latest Windows version, and save the executable file.

  • Run the .exe file and follow the installation instructions.


  1. While a Chromebook is technically a Linux system, you cannot install the software unless you partition the hard drive. This is why Chromebook users were directed to use the RStudio Cloud in the previous section.↩︎