Leading With Data· a Bicycle Guide

Partial book profile

R for Data Science Import, Tidy, Transform, Visualize, and Model Data

Hadley Wickham, Garrett Grolemund

This book provides a comprehensive, practical workflow for doing data science in R, teaching you how to import, tidy, transform, visualize, and model data using the modern 'tidyverse' suite of packages.

The full book profile is not available yet.

Get the book →

What it’s about

'R for Data Science' is a comprehensive guide to the entire data science cycle, designed to get you from raw data to understanding, insight, and knowledge as quickly as possible. This book introduces you to the `tidyverse`, an opinionated collection of R packages designed to work together to make data science faster, more fluent, and more fun. You will learn a powerful and pragmatic workflow that covers importing data with `readr`, tidying it with `tidyr`, transforming it with `dplyr`, visualizing it through the 'grammar of graphics' with `ggplot2`, and modeling it with `modelr` and `purrr`. Beyond the tools, the book instills a philosophy of data exploration and communication, empowering you to systematically investigate your data, generate hypotheses, and effectively communicate your findings using R Markdown. It's an essential resource for anyone looking to become a productive data scientist in the R ecosystem.

The through-line

Who it’s for
An aspiring or practicing data analyst or scientist who wants to turn raw data into understanding, insight, and knowledge using R. They desire a more effective, efficient, and reproducible workflow, moving beyond messy scripts to a fluent and powerful process.
The problem
Dealing with messy, inconsistent data is a constant, time-consuming struggle. Getting data into the right shape for visualization or modeling feels like a fight, and base R tools are often inconsistent and hard to remember. The analyst feels frustrated and unproductive, spending too much time on tedious data cleaning and wrangling instead of generating meaningful insights. They feel overwhelmed by the vast R ecosystem and are unsure which tools to master for a coherent workflow.
The plan
  1. Part I: Explore - Learn to visualize with `ggplot2` and transform with `dplyr` for quick, powerful wins.
  2. Part II: Wrangle - Master importing, tidying, and handling specific data types like strings, factors, and dates.
  3. Part III: Program - Write functions and use iteration tools like `purrr` to automate tasks and make code more robust.
  4. Part IV: Model - Use models as a tool for exploration, partitioning data to uncover deeper insights.
  5. Part V: Communicate - Share your work effectively and create reproducible reports using R Markdown.
The payoff
Achieve fluency in a complete, end-to-end data science workflow. · Confidently tackle a wide variety of data challenges using a consistent and powerful set of tools. · Spend less time on tedious wrangling and more time generating and communicating valuable insights.

See our guide

Related profiles we’ve built

Featured in these guides

Co-cited books