2  🏁 R Setup

2.1 Options for running R

R (R Core Team 2021) is a programming language that you need to download onto a computer and you need to have some sort of way to interact with it via an Interactive Development Environment (IDE). RStudio (RStudio Team 2020) is one such IDE; and it is the one we will be using for this course. In other words, you can’t just download RStudio (RStudio Team 2020) or R (R Core Team 2021). You need to download R (R Core Team 2021) – the language – and RStudio (RStudio Team 2020) – a way to interact with R.

You can either download these onto your own computer (locally) 💻 or use them from another computer provided by a service (remotely/cloud) ☁️.

There are pros and cons to each option.

  • Locally:
    • ✅ Pros:
      • Do not necessarily need stable internet access
      • More secure in that it is not published out there on the web
      • Often have more computational capacity as you are not relying on some server.
    • 🤢Cons:
      • Requires access to a laptop or desktop
      • Speed of computations are limited to your computer’s resources
      • Unless you do some fancy stuff like setting up a virtual environment, it can create some clutter on your computer.
  • Remotely:
    • ✅ Pros:
      • Can use on anything that can connect to the internet
      • Everything is set up for you. You do not need to download R or your IDE
      • If you have an older computer or one with lower capacity, can be faster
    • 🤢Cons:
      • Sometimes requires you to start from scratch each time you use the service. Does not save progress
      • Fre-tiers are often quite limited in terms of resources made available to you for your computations

The default in this class is to locally install R and to run it with RStudio.

If you have a Chromebook or do not have a laptop (i.e. use a Tablet), then you should run R remotely with Posit.Cloud or Google Colaboratory (discussed below)

2.2 💻 Locally setting up R

2.2.1 Downloading R

  1. Go to CRAN to download the base version of the language
  2. Select the appropriate version for your Operating System (i.e. Windows, macOS, Linux)
  3. Follow the standard installation steps for software on your operating system

2.2.2 Downloading your IDE (RSTUDIO)

Note: There are other IDE’s that you can use, but they often require more technical know-how

  1. Go to Posit’s website to download RStudio
  2. Skip straight to step 2 (on the website) and Install RStudio Desktop
  3. Follow the standard install steps

2.3 ☁️ Access R remotely

If you want to access R (R Core Team 2021) remotely, you’ve got two primary options:

  1. RStudio Cloud (Now called Posit.Cloud)
  2. Google Colaboratory

2.3.1 Posit.Cloud

  1. Go to PositCloud
  2. Create an account
  3. At the top, click New Project and then click Start New RStudio Project

2.3.2 Google Colaboratory

Not really recommended. Talk to me if you do want to explore this option.