This post describes how to download and perform a basic local install of R and Rstudio. The instructions should work for both macOS and Windows users. Although not required, installation tends to work best when operating systems are up-to-date. At the time of writing, this means R/Rstudio work best with macOS High Sierra and Windows 10.
R vs Rstudio
R is a statistical computing language/environment. It is distinct from Rstudio, which is an integrated development environment (IDE) or high- powered graphical user interface (GUI) optimized for working with the R language. In other words, R is the engine, and Rstudio is the interface. Consequently, you’ll need to install both R and Rstudio.
Download and install R
Use the following instructions to download and install the R statistical computing language/environment:
- Go to the CRAN (Collective R Archive Network) website: https://cran.r-project.org/
- Click on the appropriate operating system (Mac or Windows) to navigate to download page.
- Download the most recent version of R.
- If Mac, select the first
.pkg
file listed in the “files” section. At time of writing, this is versionR-3.5.1.pkg
. - If Windows, select the bold, underline link written as ‘install R for the first time’.
- If Mac, select the first
- Double click (run) the downloaded file (check your
Downloads
folder). Click yes through prompts to install like any other program (default values should be okay). You may get a warning about the source of the download being unkown. Do whatever you can to allow the installation to continue—I promise the R pkg file is safe!
Download and install Rstudio
Rstudio is an integrated development environment (IDE) that makes it easy to use R. Once both R and Rstudio are installed, I’d actually recommend ignoring the actual “R” program and instead only open and use Rstudio, which will automatically call and allow interactive use of R.
- Go to the free download location on Rstudio’s website: https://www.rstudio.com/products/rstudio/download/#download
- Select one of the highlighted options that corresponds with your computer’s operating system (Mac or PC)
- Double (run) click the downloaded file (check
Downloads
folder). Click yes through prompts to install like any other program (the defaults should be fine). You may get a warning about the source of the download being unkown. Do whatever you can to allow the installation to continue—I promise the R pkg file is safe!
For an actual demonstration of installing R and Rstudio using these instructions, see the appropriate video for your operating system below.
Download and install R & Rstudio on a Mac
Download and install R & Rstudio on a PC (Windows)
Using R/Rstudio
You should be able to find the Rstudio
application in your computer’s
Application
or Program
folder. Alternatively, a simple search for “Rstudio” using
finder/spotlight or the Windows key should be able to locate “Rstudio” on your machine.