I sometimes get asked how I got started learning R. I thought I would use this post to go through a few books I read along the way which have been highly useful.
The Art of R Programming
The Art of R Programming: A Tour of Statistical Software Design is one of the first R books I read. If you read the table of contents of this book, you’ll see it doesn’t cover much data science-related content. However, the book is great at covering the main data structures you need to actually program in R. You’ll learn the ins and outs of vectors, data frames, matrices, lists, and so on.
Another point I like about the book is that it’s good at explaining the primary structures that you need to use to properly program in R – functions, environments, and an introduction to R’s object-oriented system. Understanding these foundations is priceless for wherever you go with R.
The downside is this book doesn’t teach you much pure data science – however, that’s not the text’s intention. Overall, it’s well worth the read.
If you’re newer to R and want to get introduced to its statistical capabilities, you should check out R Cookbook: Proven Recipes for Data Analysis, Statistics, and Graphics. An updated version of the book came out last year.
This book, like it sounds, is written in a recipe-like format. It presents problems and then provides code solutions, making it really practical. The trade-off is there’s less material on pure R programming, but no one book can cover everything.
The “cookbook” also has a nice chapter on “useful tricks” in R, covering the tictoc package for timing R code, defining binary operators (“%…%”), and specific RStudio tips, such as finding sections of code within a long script.
This book is more for those who have the basics of R covered and are looking to take their R skills up a notch. Like
The Art of R Programming: A Tour of Statistical Software Design, this book is more about how to program in R, rather than doing modeling or statistical analysis. Advanced R also covers useful information on how to debug your code and increase its performance – which is handy regardless of why you’re using R.
One thing I liked about reading Advanced R is that it explains R’s object-oriented system really well. R’s object-oriented (OOP) setup can be a bit confusing at first if you’re used to OOP in other languages.
For more recommended books on R or other open source tools like Python, Linux, or MySQL, check out this page.