Tutorial 1: Introducing R
Week of September 2, 2024
Why should you use R?
by Greg Martin, Health Service Executive (Ireland)
You will need two components to run R in our tutorials. The first is the R software itself, which provides the programming environment and core functions; and the other is RStudio, which offers a user-friendly interface for coding, data visualization, and debugging.
The computer rooms used for tutorials are equipped with R and RStudio. However, installing these programs on your personal computer may facilitate work on course assignments, including the course reports. Note also, that other computer rooms at Loyola are equipped with R and RStudio.
To download R and RStudio for MacOS and Windows, you can use the link below:
https://posit.co/download/rstudio-desktop/
R and RStudio for Mac - Installation steps
In the link above, you will first install R and after it’s installed, you will install RStudio (in that order). Once you click the “Download and Install R” banner in the link above, you will be offered three options:
Download R for Linux (Debian, Fedora/Redhat, Ubuntu) Download R for macOS Download R for Windows
If you’re using a Mac, select “Download R for macOS.” This will take you to a page with several options. You need to know whether your Mac has an M1, M2 or M3 or an Intel processor. If you’re unsure, click the Apple icon in the top-left corner of your screen, select “About This Mac,” and then “More Info.” This will display the type of Mac you have.
For Apple Silicon (i.e., from M1, M2, or M3 processor) Macs (newer Macs), click on the first option, “R-4.4.1-arm64.pkg”, to begin the download.
For older Intel Macs (but still very commonly used), click on the second option, “Macs:R-4.4.1-x86_64.pkg”, to begin the download.
Click either link to download the package file (.pkg). After downloading, open the file and follow the installation instructions.
Next, go back to the RStudio download page at https://posit.co/download/rstudio-desktop/ and install RStudio. The website will automatically select the appropriate package file (.pkg) based on your operating system. Once the download is complete, open the downloaded file and follow the on-screen instructions to complete the installation.
R and RStudio for Windows 10 or 11 - Installation steps
Obs: for older Windows versions, talk to your instructor, Dr. Pedro Peres-Neto.
To download R and RStudio for Windows, go to the same page as before: https://posit.co/download/rstudio-desktop/
In the link above, you will first install R and after it’s installed, you will install RStudio (in that order). Once you click the “Download and Install R” banner in the link above, you will be offered three options:
Download R for Linux (Debian, Fedora/Redhat, Ubuntu) Download R for macOS Download R for Windows
If you’re using a Windows machine, select “Download R for Windows.” This will take you to a page with several options. Click the link in the first option labelled “This is what you want to install R for the first time.” THe link will take you to a new link “Download R-4.4.1 for Windows (82 megabytes, 64 bit)” at the top of the page. Click to begin download if you have Windows 10 or 11 (older versions talk to the instructor). After downloading, open the dowloaded file and follow the installation instructions.
Next, go back to the RStudio download page at https://posit.co/download/rstudio-desktop/ and install RStudio. The website will automatically select the appropriate package file (.pkg) based on your operating system. Once the download is complete, open the file and follow the on-screen instructions to complete the installation.