Homework after Session 1: do this before Session 2. Session 2 starts directly with R, so we cannot spend it on installations. It takes about 30 minutes. If something does not work, use the Posit Cloud fallback below, so that you can follow Session 2 anyway, and fix your installation afterwards.
Download and install R for your operating system from https://cloud.r-project.org/:
If you already have R, check that it is version 4.1 or newer (it is printed when R starts). Otherwise, update it.
Download and install RStudio Desktop (free) from https://posit.co/download/rstudio-desktop/. RStudio is the program you will work in; it uses the R you installed in step 1.
Download the course materials from the GitHub repository: press the green Code button and choose Download ZIP, then unzip it. If you know git, you can also clone the repository.
Open the file SDS_Intro_Konstanz.Rproj in the unzipped
folder. This opens RStudio with the course folder as working directory,
so that the file paths in the materials work.
In the RStudio Console (bottom left), run:
source("setup/install_packages.R")
This installs all packages used in the course and takes a few minutes. When it finishes, it prints either “All course packages are installed” or the list of packages that failed.
Open setup/SetupCheck.Rmd in RStudio and press
Knit. If you get an HTML page that ends with
“Everything is ready”, you are done.
If your installation does not work in time, you can run all course materials in your browser with Posit Cloud. It needs no installation and has a free plan.
https://github.com/dgarcia-eu/SDS_Intro_Konstanzsource("setup/install_packages.R") in the Console. The
first time this takes 10–15 minutes.setup/SetupCheck.Rmd and press
Knit.Every session folder of the course then works in this project, since it is a complete copy of the materials.
Keep in mind:
source("setup/install_packages.R") again, or install that
package with install.packages("name").SDS_Intro_Konstanz.Rproj, or knit the file (knitting always
runs in the file’s own folder).