Skip to content
A collection of R tutorials
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

R course material

This page contains a collection of R tutorials, developed at the Vrije Universiteit Amsterdam for Communication Science courses that use R.

The goal is to organize relevant material into modular components, for more efficient design and maintenance of material, that can be used across courses, and that are accessible to students during and after their studies.

Below we list the relevant handouts/tutorials. Each links to the md file, see the Rmd file with the same name for the source code of the tutorials.

R Basics

Data mangling in the tidyverse

This is a set of tutorials designed to teach using the tidyverse functions for data cleaning, reshaping, visualizing etc. The chapter numbers are relevant chapters from the excellent (and freely available) book "R for Data Scientists" (R4DS)

Tutorial R4DS chapter(s) Core packages / functions
R Basics 4 (base R functions)
Transforming Data 5 dplyr: filter, select, arrange, mutate
Summarizing Data 5 dplyr: group_by, summarize
Visualizing Data 3 & 7 ggplot2
Reshaping data 12 tidyr: spread, gather
Combining (merging) Data 13 dplyr: inner_join, left_join, etc.
Basic string (text) handling 14 readr: str_detect, str_extract etc., iconv

Statistical Analysis

Tutorial Core packages / functions
Basic statistics stats: lm, aov, t.test
Advanced statistics stats: glm, lme4: lmer, glmer

Text analysis

Tutorial Core packages / functions
Text analysis quanteda
Lexical sentiment analysis quanteda, corpustools
LDA Topic Modeling topicmodels,quanteda
Structural Topic Modeling stm, quanteda
NLP Preprocessing with Spacy(r) spacyr, quanteda (see also spacy itself)
Supervised machine learning for text classification caret


You can’t perform that action at this time.