Hello and welcome! This online book is structured as a series of walk-through lessons in R that will have you doing real data science in no time. It covers both the core ideas of data science as well as the concrete software skills that will help you translate those ideas into practice.

Many of these lessons operate on the premise of “mimic first, understand later.” That is, I’ll introduce bits of R code that do something interesting and ask you to mimic them word for word to see what they do, without necessarily understanding the details at first. The theory here is that if you see the “what” first, you’ll be more motivated to understand the “how” and “why.”

This book also assumes you’ve never seen R before. If that’s you, just start with Lesson 1: Getting started in R. If you’ve used R before, you might be better off skipping around using the Table of Contents in the sidebar. Either way, I hope you enjoy these lessons. And feel free to drop me a line if you catch any errors or have any feedback!