Tutorial 1: Introducing & Installing R & RStudio


September 7 to 10, 2026

Why should you use R?
by Greg Martin, Health Service Executive (Ireland)

You will need two components to work with R in our tutorials. The first is R, a programming language and software environment for statistical computing, data analysis, and graphics. The second is RStudio, an integrated development environment (IDE) that provides a user-friendly interface for writing and running R code, managing files and projects, viewing plots and results, and debugging code.

The computer rooms used for tutorials are already equipped with both R and RStudio. However, installing them on your personal computer may make it easier to work on course assignments, including course reports. Other computer rooms at the Loyola Campus may also have R and RStudio installed.

R and RStudio for Mac - Installation steps

Installing R and RStudio

To use R on your personal computer, you will need to install two programs: R and RStudio. They should be installed in this order:

  1. Install R first
  2. Install RStudio second

R is the programming language and computational environment that actually performs the analyses. RStudio is an integrated development environment (IDE) that provides a more convenient interface for working with R.

Step 1: Download and install R

Download R from the Comprehensive R Archive Network (CRAN):

https://cran.r-project.org/

On the CRAN page, choose the link corresponding to your operating system:

Windows: Select “Download R for Windows”, then “base”, and then click the download link for the latest version of R. Once the installer (.exe file) has downloaded, open it and follow the installation instructions. The default installation options should be appropriate for this course.

Mac: Select “Download R for macOS.” You will see different installers depending on your Mac’s processor. Recent Macs use Apple silicon (M1, M2, M3, M4, etc.), whereas older Macs generally use an Intel processor.

If you are unsure which processor your Mac has, click the Apple menu () → About This Mac and look for Chip or Processor. Choose the corresponding R installer (.pkg file), download it, open it, and follow the installation instructions.

Important: Complete the installation of R before installing RStudio.

Step 2: Download and install RStudio

Once R has been installed, download the free RStudio Desktop application from Posit:

https://docs.posit.co/ide/user/#rstudio

The download page should identify your operating system and recommend the appropriate installer. Make sure you select the free, open-source version of RStudio Desktop.

Windows: Download the Windows installer (.exe), open the downloaded file, and follow the installation instructions.

Mac: Download the macOS installer (.dmg). Open the downloaded file and drag RStudio into your Applications folder when prompted.

Step 3: Check that everything works

After both programs have been installed, open RStudio. You normally do not need to open R separately; RStudio will automatically use the R installation on your computer.

If RStudio opens and you see the Console pane with an R prompt (>), you should be ready to use R for BIOL322.