R
A language built for statistics and data analysis.
R is taught here in 12 lessons, running from Vectors, factors and data frames through to Debugging R: warnings, factors, NA and performance traps. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | Python & Data Science |
| Lessons | 12 |
| Level | Beginner to intermediate |
| Reading time | about 3 hours |
| Prerequisites | Helpful, but not required: Python 2.x |
Lessons
- Vectors, factors and data framesThe four things every R user does with a vector, and the data frame rules that decide whether your analysis is correct.
- Data manipulation with base RSelect, filter, arrange, mutate, group and join without leaving base R — and the exact dplyr verb each base expression replaces.
- Base graphics and ggplot2The painter's model behind base plots, the grammar behind ggplot2, and how to write a chart to a file without losing it.
- Installing R and RStudio: the environmentInstall R and an IDE, use projects to keep working directories honest, and learn the handful of commands that answer most questions about a session.
- Reading and writing dataLoad CSV, Excel and database data with the right defaults, and choose between a portable CSV and a faithful RDS when you save.
- Tidyverse workflow: dplyr and tidyrChain verbs with the native pipe, group and summarise correctly, reshape between wide and long, and join tables without duplicating rows by accident.
- Writing functions, control flow and the apply familyDefine functions with lazy scoping in mind, replace loops with map functions, and choose between base apply, purrr and vectorisation.
- Strings and dates with stringr and lubridateMatch, extract and replace text with a consistent API, then parse, shift and compare dates without losing track of time zones.
- Statistical modelling: lm, glm and the formula interfaceFit linear and logistic models with the formula syntax, read the summary critically, predict on new data, and check that the model assumptions hold.
- R Markdown and reproducible reportsWrite narrative and code in one file, control chunk behaviour, parameterise a report, and pin the package versions it needs.
- Package management with CRAN, renv and BioconductorInstall from the right source, keep project libraries isolated with renv, install from GitHub deliberately, and know what a licence check requires.
- Debugging R: warnings, factors, NA and performance trapsTell the four kinds of missing value apart, avoid factor and comparison traps, use the debugger, and stop writing loops that should be vectorised.
More in Python & Data Science
Python 3 NumPy pandas Matplotlib Jupyter Notebook Flask FastAPI Django SciPy Pillow Python 2.x Julia
FAQ
How long does the R course take?
It has 12 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for R?
Not strictly. It helps to have read Python 2.x first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after R?
Continue with Julia (13 lessons), the next course in Python & Data Science.