Materials for 4-week Introduction to R and the tidyverse M.A.-level course taught at the University of Freiburg ("Practical Foundations of Linguistic Research") in January/February 2021.
- R scripts and R-Markdowns in R-Studio
- Variables and data types
- Packages
- Reading and writing data
- Exploratory Data Analysis basics
- Descriptive statistics
- Factors
- Tibbles
- Pipes (%>%)
- Selecting and removing columns with select()
- Renaming columns with rename()
- Changing column order with reorder()
- Adding columns and changing column values with mutate()
- Using conditional logic on rows with filter()
- Creating summary tables with groupby() and summarize()
- Creating new columns using conditional logic with mutate() and ifelse()
- Review of filter(), groupby() and summarize() & mutate() and ifelse()
- Helper functions for select()
- Helper functions for filter()
- Warnings, errors, and documentation
- Chaining commands ("thinking tidyverse")
- The grammar of graphics
- Basic structure of a ggplot
- Charts by variable type, incl. bar charts, histograms, scatterplots (w/ trendlines), line graphs, boxplots
- Adding more variables with fill and color
- Adding labels
- Basics of adapting themes
- Code variations, i.e. placement of aes()
- Piping into a ggplot
- Saving ggplots to disk