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

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

By: Hadley Wickham and Garrett Grolemund
  • My go-to book for all things R related
  • This book introduces you to R, RStudio, and the tidyverse, a collection of R packages designed to work together to make data science fast, fluent, and fun.
  • Suitable for readers with no previous programming experience, it is designed to get you doing data science as quickly as possible.

Stopped Reading the Book Halfway into 1st Chapter

I got through the Preface and about 60% of the first chapter and had to stopped.

Before I get into the review to explain why I had to stop reading the book, it is important to note that this book is available online for free. I prefer print over screen, when possible. But if you don’t have a preference, just use that.

Why did I put this book down midway through Chapter 1?
Cascade of events that started w/ me requiring solutions to practice problems that are in the book.

The only way to learn math and software development is by doing. Books on these subjects should ALWAYS contain exercise problems and solutions to those problems, either at the end of the chapter or by way of an appendix at the end of the book.

The best solutions that I found are at jrnold's github page. I quickly noticed, however, that the answers posted on that site didn't quite fit the exercises in the book. When comparing the online version to the printed version (book), I noticed that exercises from the book had been reworded or completely dropped. So from the beginning of this year, when this book was published and released for sale, to this summer, it is apparent that many errors had been found and revisions needed to be implemented.

There were so many differences between the online version and the book that I decided to stop reading the book in lieu of the online version.

My 5-star Rating:
The author does an excellent job explaining topics. He is very knowledgeable and it shows. With the amount of revisions in such a short time, however, I can't help but think that this book was rushed.

But if I am stopped reading the book b/c of errors, why 5 stars? The book, by itself, might have gotten a 1-star review from me, but I am still going to learn from this author. The online version costs him/someone to keep up-to-date. Purchasing the book is an easy (and very fair) way to support this project.




More Praises

An excellent introduction to using R for Exploratory Analysis.

Wickham and Grolemund have produced an excellent book that would help a beginning R user become very efficient in explanatory analysis. Unsurprisingly the approach that they expound utilises the "hadleyverse" a collection of packages (ggplot2 for visualisation, tidyr for reshaping, dplyr for selecting and filtering, purrr for functional programming, broom for linear models etc) that dramatically speed up most of the common steps involved in an analysis. One benefit of Wickham's involvement in these packages has been a coherent philosophy that sits behind them. It can be a little tricky when learning this philosophy, but the long term benefits are enormous.

The book is broken up into a number of sections that effectively builds up the ability to ingest, transform, visualise and model datasets. A good portion of the book is available in an online version, to give you a taste of how it is written. Many have been following it as it was written. I have passed on copies of the book to a number of colleagues who were just starting out and the response has been uniformly positive. In my own case I was familiar with some of the these packages; ggplot2, dplyr, tidyr, but found the book taught me purrr and how to better use the packages together.

Probably my two biggest caveats to readers are that there are situations where packages from outside the "hadleyverse" maybe required. The authors do a great job of pointing this out, but it does pay in my experience to know data.table and lattice for example. Both because they can occasionally fit a problem better but also because you inevitably come across other people's code where these packages are used. The other caveat is that the modelling is a little rudimentary. Most of the examples are just fitting independent regression models, whereas it seems to me that a hierarchical model would be a better fit. Still these are small things and it would be silly to expect a single book to cover all of these areas.

In short this is the book I would give to someone who was keen to learn about how to use R for data science. It reads really well building up the different components whilst still being a valuable reference if you just need a reminder of a particular package (what is the difference between tibbles and data frames again?). Even though a good portion of the book is available online, it is well worth it to have the full thing on your bookshelf (digital or otherwise). On a broader note with Max Kuhn (author of the excellent "Applied Predictive Modelling" with Kjell Johnson) joining Wickham and Grolemund at RStudio, it is a great time to start your R journey.

Stephen Oates

New York City

This is a solid book and I am glad I purchased it

This is a solid book and I am glad I purchased it. That said, the book is not for the novice. I think it's most useful to people who have had an exposure to R or at least programming. I am a novice to the programming world (although with good experience in statistics using stats applications like SPSS and some basic syntax writing experience), and I found that while certain parts of the books were helpful, others moved very fast and completely over my head, without the sufficient detail or an explanation that I could dig my teeth into. The exercises were not terribly helpful at cementing the knowledge either: many are far more complex than the chapter itself (and no answers that I could find in the book--although I found the answers online). However, I don't know that there really are any solid guides written for the novice R user trying to learn data science, so this may still be the best of the bunch. In addition to reading this book, expect to be taking online courses on R and watching YouTube videos when you are stuck on a specific question.


Portland, OR

Best book to learn how to handle data in R

Really enjoyed this book. Full of examples. Is a learning by doing book.

High quality printing, full color code and graphs. The book stay open.

Sergio Uribe


Book Details

Publisher : O’Reilly Media; 1st edition (January 10, 2017)
Language: : English
ISBN-10 : 1491910399
ISBN-13 : 978-1491910399
Item Weight : 1.24 pounds
Dimensions : 5.98 x 1.05 x 9.02 inches
Best Sellers Rank : #8,710 in Books (See Top 100 in Books)
#2 in Mathematical & Statistical Software
#5 in Data Processing
#11 in Statistics (Books)

About the Author

Hadley Wickham and Garrett Grolemund


Hadley Wickham is an Assistant Professor and the Dobelman FamilyJunior Chair in Statistics at Rice University. He is an active memberof the R community, has written and contributed to over 30 R packages, and won the John Chambers Award for Statistical Computing for his work developing tools for data reshaping and visualization. His research focuses on how to make data analysis better, faster and easier, with a particular emphasis on the use of visualization to better understand data and models.

Garrett Grolemund is a statistician, teacher and R developer who currently works for RStudio. He sees data analysis as a largely untapped fountain of value for both industry and science. Garrett received his Ph.D at Rice University in Hadley Wickham’s lab, where his research traced the origins of data analysis as a cognitive process and identified how attentional and epistemological concerns guide every data analysis.

Garrett is passionate about helping people avoid the frustration and unnecessary learning he went through while mastering data analysis. Even before he finished his dissertation, he started teaching corporate training in R and data analysis for Revolutions Analytics. He’s taught at Google, eBay, Axciom and many other companies, and is currently developing a training curriculum for RStudio that will make useful know-how even more accessible.

Outside of teaching, Garrett spends time doing clinical trials research, legal research, and financial analysis. He also develops R software, he’s co-authored the lubridate R package–which provides methods to parse, manipulate, and do arithmetic with date-times–and wrote the ggsubplot package, which extends the ggplot2 package.

Downloads & Materials