Information and course material for the Projects in R course of the Public Health Sciences Course Program at the University of Bern
Course participants will bring their own laptops with installed versions of R, RStudio, and Git:
If you are new to R and RStudio, we recommend you to follow the 90-minute video tutorial Introduction to R and RStudio.
The following preparation steps are optional. You will also have time during the course to complete these steps.
usethis
package for R using the following command: install.packages("usethis")
usethis::use_git_config(user.name = "Jane Doe", user.email = "jane@example.org")
To work on the exercises, course participants have to install the following packages:
usethis
- Workflow packagegitcreds
- Queries Git credentials from Rhere
- Easy file referencingtidyverse
- A set of packagesmedicaldata
- Medical data setscowplot
- Features to create publication-quality figuresSimply type install.packages("packagename")
, but RStudio will ask you about it as well if you want to load a package that you haven’t installed yet.
Day | Time | Topic | Slides | Lecturer(s) |
---|---|---|---|---|
Monday, 22 April 2024 | 09:00-12:00 | Introduction to R, the tidyverse, and data wrangling | HTML | Christian Althaus, Alan Haynes |
Monday, 22 April 2024 | 13:00-17:00 | Data visualization with the tidyverse | HTML | Christian Althaus, Judith Bouman, Martin Wohlfender |
Tuesday, 23 April 2024 | 09:00-12:00 | Reproducibility and GitHub | HTML | Christian Althaus, Alan Haynes |
Tuesday, 23 April 2024 | 13:00-17:00 | Writing a reproducible report using Markdown/Quarto | Christian Althaus, Alan Haynes, Judith Bouman, Martin Wohlfender |
You can download all slides here. If you want to see them in your web browser, click the corresponding link in Timetable.
We will use the following data sets during the course:
File | Description | Source |
---|---|---|
COVID19Cases_geoRegion.csv | Laboratory-confirmed SARS-CoV-2 cases by region | FOPH |
COVID19Cases_geoRegion_AKL10_w.csv | Laboratory-confirmed SARS-CoV-2 cases by region and age group | FOPH |
covid_cantons_2020_06.csv | Laboratory-confirmed SARS-CoV-2 cases for selected cantons and time period | FOPH |
ebola.csv | World-wide Ebola cases from 2014-2016 | data.world |
insurance_with_date.csv | Data on costs of medical procedures | kaggle |
We recommend the following online tutorials and books on R and RStudio with specific applications to epidemiology, public health, and data science:
If you have any questions regarding the course, please get in touch with us at phs-info.ispm@unibe.ch or christian.althaus@unibe.ch.