R

3 recommended books on learning R

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.

R Cookbook

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.

Advanced R

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.

Please follow my blog on Twitter to see the latest posts!.

Andrew Treadway

Recent Posts

Software Engineering for Data Scientists (New book!)

Very excited to announce the early-access preview (MEAP) of my upcoming book, Software Engineering for…

2 years ago

How to stop long-running code in Python

Ever had long-running code that you don't know when it's going to finish running? If…

3 years ago

Faster alternatives to pandas

Background If you've done any type of data analysis in Python, chances are you've probably…

3 years ago

Automated EDA with Python

In this post, we will investigate the pandas_profiling and sweetviz packages, which can be used…

3 years ago

How to plot XGBoost trees in R

In this post, we're going to cover how to plot XGBoost trees in R. XGBoost…

4 years ago

Python collections tutorial

In this post, we'll discuss the underrated Python collections package, which is part of the…

4 years ago