The instructions below include screen shots from the installation process in which we used the Chrome browser which, although not necessary, you can freely download and install from here: https://www.google.com/chrome/.
RStudio is an interactive desktop environment, but it is not R, nor does it include R when you download and install it. Therefore, to use RStudio, we first need to install R.
- You can download R from the Comprehensive R Archive Network (CRAN)112. Search for CRAN on your browser:
- Once on the CRAN page, select the version for your operating system: Linux, Mac OS X, or Windows.
Here we show screenshots for Windows, but the process is similar for the other platforms. When they differ, we will also show screenshots for Mac OS X.
- Once at the CRAN download page, you will have several choices. You want to install the base subdirectory. This installs the basic packages you need to get started. We will later learn how to install other needed packages from within R, rather than from this webpage.
- Click on the link for the latest version to start the download.
- If you are using Chrome, at the bottom of your browser you should see a tab that shows you the progress of the download. Once the installer file downloads, you can click on that tab to start the installation process. Other browsers may be different, so you will have to find where they store downloaded files and click on them to get the process started.
If using Safari on a Mac, you can access the download through the download button.
- You can now click through different choices to finish the installation. We recommend you select all the default choices.
Select the default even when you get an ominous warning.
When selecting the language, consider that it will be easier to follow this book if you select English.
Continue to select all the defaults:
On the Mac it looks different, but you are also accepting the defaults:
Congratulations! You have installed R.
- You can start by searching for RStudio on your browser:
- You should find the RStudio website as shown above. Once there, click on Download RStudio.
- This will give you several options. For what we do in this book, it is more than enough to use the free Desktop version:
- Once you select this option, it will take you to a page in which the operating system options are provided. Click the link showing your operating system.
- Once the installation file is downloaded, click on the downloaded file to start the installation process:
- We recommend clicking yes on all the defaults.
On the Mac, there are fewer clicks. You basically drag and drop the RStudio icon into the Applications folder icon here:
Congratulations! You have installed RStudio. You can now get started as you do on any other program in your computer. On Windows, you can open RStudio from the Start menu. If RStudio does not appear, you can search for it:
On the Mac, it will be in the Applications folder:
Pro tip for the Mac: To avoid using the mouse to open RStudio, hit command+spacebar to open Spotlight Search and type RStudio into that search bar, then hit enter.