1.1 Installing R and RStudio

At the time of writing this module, the latest version of R was 4.3.1 (“Beagle Scouts”) (2023-06-16). At the beginning of term, it is recommended that you update to the latest version of R, but once you’ve started into the tutorials, it is recommended that you NOT update again until after term is complete. This is to avoid any unforeseen problems introduced by the update. However If you have an older operating system on your computer, you’ll want to check compatibility of both R and RStudio.

RStudio is now owned by “posit”, and its website (posit.co) should detect your operating system and provide the appropriate download option automatically. The website with older versions of R is here, and older versions of RStudio is here.

Follow the instructions below, and you are encouraged to view this YouTube video here prior to starting the steps. It talks about installing for different operating systems and different vintages of Macs (e.g. newer M1 chips versus Intel chips).

  • Download and install both R and RStudio (Desktop version) on your computer.

R needs to be installed successfully >prior< to installing RStudio (because the latter depends on the former)

  • Figure out what operating system (and version) you have on your computer (e.g. Windows 10; Mac OS X 12.51 “Monterey”)
  • Go to this website and click on the appropriate download link at the top of the page (depending on your operating system, Windows / MacOS / Linux)
    • For Windows users, download the “base” version; this file will be called something like R-4.1.1-win.exe. Executing this file launches a familiar Windows Setup Wizard that will install R on your computer.
    • For Mac users, download the “pkg” file that is appropriate for your version of MacOS; the file will be called something like R-4.1.1.pkg. Download and run this installation package—just accept the default options and you will be ready to go.
  • Now to install RStudio: once you have installed “R”, go to this website and click on the “download” button in the top right corner, then select the blue button underneath the “RStudio Desktop FREE” column. Then, click on the appropriate link under the “Installers for Supported Platforms” heading; this again depends on what platform / operating system you’re using. It will likely be one of the first two options.