Book: The Art of R Programming

Posted to Reviews  |  Tags: ,

R, the favorite computing language of a growing number of statisticians, is friendly enough that you can get a lot done without being an expert programmer, because there are a lot of packages and built-in functions that can take care a lot of the grunt work for you. Learn how to use a function, prepare your data, and you get some output. However, as you use R more, whether it's for analysis or just for graphics, there comes a point when there isn't a package or function that does exactly what you want.

Norman Matloff's Art of R Programming is for those who want to learn to write their own software in R. This is an R programming book that starts from the beginning — running R, vectors, lists — to the more advanced such as simulations, object-oriented programming, and debugging.

As the back cover says, no statistical knowledge is required to learn from this book, because it really is a book about programming written by a computer science professor (although Matloff is a former professor of statistics).

The technical reviewer and an active member of the R community, Hadley Wickham no doubt provided additional depth to the text. There are lots of examples and explanations to go along with the code.

The graphics chapter is relatively basic, explaining how to produce a few plots, so you won't get a ton out of this part other than a foundation to look into other resources. If you really want to learn the nuts and bolts of graphics in R, Paul Murrell's R Graphics is a good choice (but kind of pricey). And of course Visualize This for more high-level material. I only mention this though because this is a visualization blog — not because I was expecting more about graphics in Art of R Programming.

Here's who Matloff says the book is for:

Many use R mainly in an ad hoc way—to plot a histogram here, perform a regression analysis there, and carry out other discrete tasks involving statistical operations. But this book is for those who wish to develop software in R. The programming skills of our intended readers may range anywhere from those of a professional software developer to "I took a programming course in college," but their key goal is to write R code for specific purposes.

That's about right. If you've never written a line of code, you might find some of the concepts challenging, but if you have at least a vague idea of what programming is, you should find Art of R useful. I'm keeping this one.

An open-source, "rough and partial" draft of the book can be found here [pdf]. The draft has a lot of the same ideas so you can get a good idea for what Art of R Programming is about, although from a quick scan, the final is more polished and contains more material.

4 Comments

  • Armida Malacara November 16, 2011 at 10:08 am

    Do you have intentions to translate your book (Visualize this) to spanish? I hope so, best regards.

  • There are so many R books out there, especially offered by O’Reilly, that I’m not even certain what book to purchase. This book is an introduction but is it going to be instantly actionable? Are there other reviews of R book out on FlowingData or any other site?