Installation of R and RStudio

What is R and RStudio?

R, or RStudio is a statistical software programming package that allows the user to carry out different types of statistical analysis. It can also be used as a GIS software to perform various kinds of spatial analysis as you will see throughout the course of GEOG0114. In the same vein, you can use it for data managing and geo-processing (i.e., importing different types of spatial formats for manipulation beforehand for spatial analysis). There are two versions:

The famous icon on the left is the version for R, and the one on the right is the version for RStudio. Both software packages are the same. The only difference is that RStudio is attractive, intuitive, and more importantly, it is user-friendly than Base R. So, we will be using this version (i.e., RStudio) throughout the course.

Let us talk about downloading RStudio.

Downloading and install R and RStudio on to your laptop

RStudio is an open source software, and today its the go-to software for many researchers - its highly recommended for anyone in the domains of data science, scientific research, and technical communication.

It is easy to access, and easy to download and install. In order for RStudio to work you must first install R. You can follow the steps to download and install the correct version of R and RStudio for your operating system (i.e., Windows or MAC).

Installation for MacOS users

You will need to have the following software installed for R and RStudio to work properly on MAC.

  1. R (version 4.5.1) and RStudio (version 2025.09.0-387)
  2. XQuartz (version 2.8.5)
  3. XCode (version 26.0.1)
  4. GNU Fortran (version 12.2)

Installation of R (4.5.1) and RStudio (2025.09.0-387) on MAC:

OS User type R (Base) RStudio Desktop
MAC (Intel) R-4.5.1-x86_64.pkg RStudio-2025.09.0-387.dmg
MAC (M1, M2, M3, or M4) R-4.5.1-arm64.pkg RStudio-2025.09.0-387.dmg
  • First download the appropriate R (Base) file for the appropriate MacOS.
  • Double-click the downloaded file (i.e., R-4.5.1-x86_64.pkg or R-4.5.1-arm64.pkg) and follow the steps to complete the installation.
  • Next, download the RStudio-2025.09.0-387.dmg to install RStudio.
  • Double-click the downloaded file (i.e., RStudio-2023.06.2-561.dmg) and then drag and drop the RStudio icon into the Applications folder to complete the installation.

Installation of XQuartz (2.8.5):

Some functions in R require some of the libraries from XQuartz to function properly on your MAC.

  • You can download the latest version of XQuartz (XQuartz-2.8.5.pkg) by clicking on this LINK and complete the installation process by following its steps.

Installation of XCode (26.0.1):

Some functions in R require some of the external developer tools from XCode application to function properly on your MAC.

  1. Go to the App Store application and get the XCode app downloaded by clicking on this LINK.
  2. Once it is downloaded, you can click on the “OPEN” button to verify it’s been downloaded. A window will prompt you to complete installation.

GNU Fortran (version 12.2):

R (Base) and some packages require the GNU Fortran 12.2 compiler in order to function smoothly on your MacOS.

  • Download this specific version of GNU Fortran 12.2 (gfortran-12.2-universal.pkg) by clicking on this LINK and simply complete the installation process by following the steps on your system.
Note

The above four steps should complete the installation process for R and RStudio on MAC.

Installation for Windows users

You will need to have the following software installed for the rstan package to work on Windows.

  1. R (version 4.5.1)
  2. Rtools45 (version 4.5)
  3. RStudio (version 2025.09.0-387)

Installation of R (4.5.1) and RStudio RStudio (2025.09.0-387) on Windows:

OS User type R (Base) RStudio Desktop
Windows R-4.5.1-win.exe RStudio-2025.09.0-387.exe
  • Download the file for R-4.5.1-win.exe attached in the table above.
  • Double-click the downloaded file (i.e., R-4.5.1-win.exe) and follow the steps to complete the installation.
  • Now, we can download the file (i.e., RStudio-2025.09.0-387.exe) for RStudio from the link provided in the above table.
  • Double-click the downloaded file (i.e., RStudio-2025.09.0-387.exe) and follow the steps from the installer to complete the installation.

Installation of Rtools 4.5

For Windows users, after you have completed the installation for R and RStudio, you are required to install the Rtools45 package as it contains some libraries and developer tools for the smooth functioning of R.

  • Download the latest version of Rtools45 by clicking on this LINK to initiate the download of the Rtools45 installer.
  • Double-click the downloaded rtools45-6608-6492.exe file and follow the steps to complete the installation.
Note

The above two steps should complete the installation process for R and RStudio on Windows.

Warning

The installation of all programs on Windows and MacOS are specifically for R (version 4.5.1) and RStudio (version 2025.09.0-387), which are the most up-to-date versions of R and RStudio, respectively, as of writing these instructions today (02/10/2025). If an update get pushed for these software - make sure to check that supporting programs (i.e., Rtools for Windows, and XQuartz & XCode for Mac) are updated.

This concludes the installation section and sets your computer up for the course.