The CUBI R crash course
Notes on lectures. Lectures are always available as two files. The Rmarkdown file (extension .Rmd) is the source file. It is easy to browse and to understand, just click on it to view it. You can learn a bit of Rmarkdown with that, and also you will see exactly how all the plots and R output are generated.
HTML files (the ready presentations) are a bit more tricky. Github does not allow viewing these files directly, if you click on them, you will see the HTML source.
To view HTML files, use the following links:
-
Lecture 1: working with Rstudio; simple data types; selecting vectors
-
Lecture 2: complex data types (matrices, lists, data frames); reading data; diagnosing data problems
-
Lecture 3: Reading and cleaning data; reshaping data frames
-
Lecture 4: Searching in data; combining data frames
-
Lecture 5: Visualisations, rmarkdown, Freestyle
The scripts with analysis for each day are provided in the folder Scripts/ . They contain commands discussed during the lectures and example solutions for the exercises.
Instructions for installing R and Rstudio:
Advanced: Cloning the repository using Rstudio.
All course materials are on the website https://github.com/bihealth/RcrashCourse2023/. This webpage is a repository. Instead of downloading the materials one by one, you can make a perfect copy locally (which is called "cloning") and update it (semi-)automatically when anything changes.
If you want to save yourself some work (and learn something new at the same time), you can directly clone the repository of the course using Rstudio.
First, install git (follow the instructions here).
Once git is installed, open Rstudio, select File -> New Project, then choose "Version control", "Git", and enter "https://github.com/bihealth/RcrashCourse2023/" as the repository URL. Select a directory where you would like to clone the repository, and click the "Create repository" button. Rstudio will download all course materials.
In the top right corner, a new pane appears with the name "git". When you select it, clicking the blue "down" arrow ("pull") will update your local directory with any changes that have been made to the course repo in the meanwhile.