Installing R

This document will walk you through the installation of R and RStudio. R is the workhorse that actually does the computations. During the classes, you won’t ever need to launch the R program directly, but it has to be installed on your computer.

RStudio is an integrated development environment, or IDE, and provides a nice graphical front-end to R. This is the program you will interact with directly, but it depends “under the hood” on R itself.

Go to the R project R project website by clicking here. On the left-hand side, you’ll see a link for CRAN under the “Download” heading. Click it.

The website will now offer you a choice of “mirrors”, like this.

These are just different servers that host the same downloads, to reduce the demand on any one server. It really doesn’t matter which one you pick.

Once you’ve chosen a mirror, you’ll see a page like this:

Click on the appropriate Download link for your computer’s operating system. I’m on a Windows, so I clicked the “Download R for Windows” link.

Now you should be on the download page itself. Click the link for the first file in the list, which for me is “Install R for the first time”:

The 3.6.1 bit is the version number.

Once you’ve downloaded this file, open it to run the R installer. Follow the instructions on screen. You’re done! The R program should now live wherever programs normally live on your hard drive (e.g. in the “Programs/Applications” folder on your hard drive).

Installing RStudio

Go to the RStudio download page by clicking here, which looks like this.

Under the list entitled “RStudio Desktop Free”, click on the link for your computer’s platform.

Once you’ve downloaded this file, open it to run the RStudio installer. That’s it; you should now have a copy of RStudio on your computer.

Find the RStudio program and open it. You should see a window that looks something like this, perhaps with minor differences in the layout of the panels.

You’re done!