Quick Overview

Column 1

Outline

R is rapidly becoming the standard platform for data manipulation, visualization and analysis and has a number of advantages over other statistical software packages. A wide community of users contribute to R, resulting in an enormous coverage of statistical procedures, including many that are not available in any other statistical program. Furthermore, it is highly flexible for programming and scripting purposes, for example when manipulating data or creating professional plots. However, R lacks standard GUI menus, as in SPSS for example, from which to choose what statistical test to perform or which graph to create. As a consequence, R is more challenging to master. Therefore, this course offers an elaborate introduction into statistical programming in R. Students learn to operate R, make plots, fit, assess and interpret a variety of basic statistical models and do advanced statistical programming and data manipulation.

Materials covered:

Day 1:
  • Installing R/Rstudio or signing up for RStudio Cloud (done at home)
  • Getting comfortable with notebooks/projects/scripts
  • Getting help
  • Variables in R: basic data types (character, numeric, integer, logical, date) and data structures (vectors, matrices, lists, data.frames)
  • Understanding/installing packages
  • Reading a CSV and calculating descriptive statistics
  • Control flow (if-else statements and for loops)
  • Functions: creating your own functions
  • Best practices in R
  • Reproducible science and dependency management in R
  • If time allows: data visualization: design and storytelling (slides)[https://github.com/jgarciab/workshop_data_viz]
Day 2:
  • Principles of tidy data and short comparison of base R and the tidyverse
  • Reading and writing files in several formats
  • Data wrangling with the tidyverse
  • Inferential statistics: A 5-min primer of linear regression
  • Databases

Daily schedule

Start End What?
09.00 10.00 Lecture
10:00 10.45 Practical
10.45 11.00 Discussion
break
11.00 11.45 Lecture
11:45 12.40 Practical
12:40 13.00 Discussion

How to prepare

Column 1

Option 1: Without administrator rights or the ability to install R/RStudio

Steps: please sign up for Posit Cloud. Choose the free plan.

Column 2

Option 2: Installing R and RStudio from scratch

Steps:

    1. Install R: R can be obtained here. We won’t use R directly in the course, but rather call R through RStudio. Therefore it needs to be installed.
    1. Install RStudio Desktop: Rstudio is an Integrated Development Environment (IDE). It can be obtained as stand-alone software here. The free and open source RStudio Desktop version is sufficient.

Column 3

Option 3: You have an old version of R

Steps: see this manual.

  • To update R: The function updateR() in the package installR (Windows) or updateR (Mac) is the easiest route.
  • To update RStudio Desktop: Download the new version here.

Day 1

Column 1

Materials

To ensure that you work with the latest iteration of the course materials, we advice all course participants to access the materials online.

All lectures are in html format. Practicals are files that guide you through the exercises. Use the files without solutions unless you get stuck. Please ask questions to the instructors if something is not 100% clear.

Column 2

Useful references

The above links are useful references that connect to today’s materials.

Day 2

Column 1

Materials

To ensure that you work with the latest iteration of the course materials, we advice all course participants to access the materials online.

All lectures are in html format. Practicals are files that guide you through the exercises. Use the files without solutions unless you get stuck. Please ask questions to the instructors if something is not 100% clear.