R is the programming language and computing engine, while RStudio is an integrated development environment (IDE) that makes working with R much easier.

In this course, we will use RStudio to write and run R code, manage files and projects, view plots, and work with packages.

Install R

R is free and open-source software available from the CRAN download page.

Windows

Installing R on Windows is straightforward.

  1. Select Download R for Windows, as shown in the following screenshot.

  2. Click on install R for the first time.

  3. Click on Download R-X.X.X for Windows.

  4. Once the download is complete, install R as you would any other software.

macOS

For Mac users, the installer differs between Macs with Apple silicon and older Intel-based Macs.

If you do not know which one you have, go to Apple menu () → About This Mac.
  • Chip → Apple silicon
  • Processor → Intel Mac
  1. Select Download R for macOS
  2. On the following page, download either:
    • R-X.X.X-arm64.pkg ← Apple silicon
    • R-X.X.X-x86_64.pkg ← Intel Mac
  3. Once the download is complete, install the downloaded .pkg file as you would any other software.

Linux

For Linux users, you probably already know the drill, but here it is anyway…

  1. Select Download R for Linux

  2. Select your linux distribution (debian, fedora, redhat, suse, or ubuntu)

  3. Follow the instructions shown on the download page.

Check your R installation

After installation, try opening R. If you see the R console with a > prompt, type:

> 1 + 1

You should see:

[1] 2

If so, that’s it! Your R installation is working.

Install RStudio

Once you have confirmed that R is working, you are ready to install RStudio.

  1. Go to the RStudio Desktop download page.

  2. Select Download RStudio

  3. Under RStudio IDE, select your Platform

  4. Once the download is complete, install the RStudio installer as you would any other software.

Make RStudio yours

Now that RStudio is installed, you can customize its appearance a little!

Try changing the theme (dark mode?), font, or other appearance settings to make RStudio yours … e.g., ☞ “mad scientist” style

Tools → Global Options → Appearance


Need help?

If you have any trouble with the installation, feel free to contact me at junichi.fujinuma@ut.ee.