Skill Roadmap

R

R is the language built for statistics — data manipulation, visualization, and modeling are first-class citizens rather than bolted-on libraries. This roadmap walks you from R and RStudio basics through the tidyverse for data wrangling, visualization with ggplot2, core statistics, and on to modeling, reporting, and building your own packages.

Why learn R?

Built by statisticians, for statistics — and still hard to beat for it

R was created specifically for statistical computing and graphics, which shows in how naturally it handles vectors, data frames, and formulas compared to general-purpose languages. It remains dominant in academia, biostatistics, epidemiology, and any field where rigorous statistical modeling is the actual deliverable.

The tidyverse — a collection of packages including dplyr, tidyr, and ggplot2 — transformed R's ergonomics over the last decade, giving it a consistent, readable syntax for data wrangling and some of the best data visualization tooling of any language.

R and Python overlap heavily in data science today; R tends to pull ahead for statistical rigor, exploratory analysis, and polished visualizations, while Python leans toward production deployment and general-purpose engineering.

The R Roadmap

Work through these in order, from syntax to a shareable analysis

STEP 1
R logo

R Basics

Get R and RStudio installed and get comfortable with the console before anything else.

What is R? Installing R & RStudio RStudio Interface Basic Syntax Comments
STEP 2

Data Types & Structures

Everything in R is a vector — the sooner that clicks, the sooner the rest makes sense.

Data Types
Numeric Integer Character Logical Factor Complex
Data Structures
Vectors Lists Matrices Arrays Data Frames
Type Conversion & Coercion
STEP 3

Operators & Control Structures

Compare values, branch, and loop — the same fundamentals as any language, in R's syntax.

Operators
Arithmetic Relational Logical Assignment (<-)
Control Structures
if / else for while repeat apply Family (sapply, lapply, vapply)
STEP 4

Functions

Write reusable logic, and understand how R actually passes arguments.

Function Basics Default Arguments Variadic Args (...) Scoping Rules Anonymous / Lambda Functions
STEP 5

Data Import & Wrangling

Get real data in, then clean, reshape, and combine it before any analysis happens.

read.csv / readr readxl Database Connections (DBI)
The Tidyverse
dplyr tidyr Pipe Operator (%>% / |>) Joins Handling Missing Data
STEP 6

Data Visualization

Turn a data frame into a plot that actually communicates something.

Base R Plotting
ggplot2
Grammar of Graphics Geoms Aesthetics Facets Themes
Interactive Plots (plotly, shiny)
STEP 7

Statistical Analysis

The core statistical toolkit R was built to make effortless.

Descriptive Statistics Probability Distributions Hypothesis Testing t-tests ANOVA Chi-Square Tests Correlation
STEP 8

Modeling

Move from describing data to predicting or explaining it.

Linear Regression (lm) Logistic Regression (glm) Model Formulas Model Diagnostics Time Series (ts) Intro to Machine Learning (caret, tidymodels)
STEP 9

Reporting & Reproducibility

Turn an analysis into something you can share, rerun, and trust.

STEP 10

Packages & Ecosystem

Manage dependencies reliably, and know where to look when you need a package.

CRAN Bioconductor renv Writing Your Own Package testthat

GitHub Projects

Real, buildable projects to put on your own GitHub

Frequently Asked Questions

Common questions from people starting out with R

Should I learn R or Python for data science?

Both are strong choices and many data scientists use both. R tends to have an edge for statistical rigor, exploratory analysis, and polished visualization; Python is generally stronger for production deployment, general-purpose scripting, and deep learning. Academic and biostatistics-heavy fields lean more on R.

What's the difference between R and RStudio?

R is the programming language and runtime itself. RStudio (now Posit) is an IDE built specifically around R — it adds a console, script editor, plot viewer, and package management in one interface, and is close to the default way people actually write R.

What is the tidyverse, and do I need it?

The tidyverse is a collection of R packages — including dplyr, tidyr, and ggplot2 — designed to work together around a consistent, readable syntax for data manipulation and visualization. It's not required, but it's become the de facto standard for modern R code and is worth learning early.

Is R good for machine learning?

Yes, particularly for classical statistical models and packages like caret and tidymodels. For deep learning specifically, Python's ecosystem (PyTorch, TensorFlow) is more mature, though R does have interfaces to both.

What's the difference between %>% and |>?

%>% is the magrittr pipe popularized by the tidyverse; |> is the native pipe built into R itself since version 4.1. Both pass the result of one expression as the first argument to the next, and code today commonly uses either depending on the project's R version and style.

How do I share an R analysis with someone who doesn't use R?

R Markdown or Quarto let you "knit" code, output, and narrative text into a shareable HTML, PDF, or Word document, while Shiny turns an analysis into an interactive web app that runs in any browser.

Track complete

From vectors and the tidyverse to ggplot2, statistical tests, and modeling — that's the core of what's expected of anyone doing serious data analysis in R. Keep building, and share what you find with R Markdown or Shiny.

Where next?

Keep exploring by domain or drill into a single skill