Course preparations

In order to have a smooth workshop start, you need to prepare a few technical things so we can jump right into coding.

If you don’t have R and RStudio installed, follow Section 1. If you need to update R and RStudio, follow Section 2.

1 Install R and R Studio

1.1 Download and install R

  1. Visit the CRAN website.
  2. Click on the link for your operating system in the top section “Download and Install R”.
  3. Follow the link to “install R for the first time”.
  4. Download the installer and run it, leaving the default options selected during the installation process.

1.2 Download and install RStudio for your operating system

  1. Visit the Posit website.
  2. Click the “Download RStudio Desktop” button. The button should already specify your operating system (If not, you can scroll down on the website and select the installer for your respective system).
  3. Download the installer and run it, following the instructions.

1.3 Test the installation

If both R and RStudio are installed, open RStudio. When you open up RStudio for the first time, it will prompt you to select your installation of R. By default, this should be the newest version of R that you just installed. After RStudio is opened, check the console (the window on the bottom left where your cursor is and where you can see a > sign) and try to type a calculation (e.g. 2 + 2) and hit Enter to execute it. If R is installed correctly, you should see the result of your calculation printed to the console.

2 Update R and R Studio

2.1 Update RStudio

Open RStudio and go to “Help -> Check for Updates” on top. RStudio will tell you, if there is a newer version available or not. If you already use the most current version, you are all set for the workshop. If not, follow the instructions that RStudio gives you and update your version of RStudio.

2.2 Update R

  1. Open RStudio and check the version number in the console pane (bottom left, see pink highlights in the screen shot).

I will be using R version 4.4.2. If your version is below 4.3.3, you should update but in general it’s always a good idea to stay up to date to get newest features and improvements.

  1. Download and install the latest version of R (see Step 1 for instructions).
  2. In RStudio, go to “Tools -> Global Options -> General” and click “Change R version”.
  3. Select the newest installed version of R.

  1. Restart RStudio and verify the updated version in the console.