December 21, 2010

R programming books

My sabbatical is rapidly coming to an end, and I have to start thinking more and more about teaching. Glancing over my module description for the introductory computational statistics course I teach, I noticed that it’s a bit light on recommend/background reading. In fact it has only two books:

Pros: I quite like this book (hence the reason I put it on my list). It has a nice collection of exercises, it “looks nice” and doesn’t assume knowledge of programming. It also doesn’t assume (or try to teach) any statistics.

Cons: When describing for loops and functions the examples aren’t very statistical. For example, it uses Fibonacci sequences in the while loop section and the sieve of Eratosthenes for if statements.

At the risk of being self-serving, I’d like to second the recommendation to our book, “Introduction to Scientific Programming and Simulation Using R”. It costs about the same as some of the others recommended here, and it’s great! 🙂 It was refined from a number of years of teaching experience in programming, so it’s explicitly designed for classroom or self-study efforts.

I have found both Murrell’s R Graphics and Wickham’s ggplot2 to be pretty indispensable. There’s no point in analyzing data if you cannot effectively communicate the results, and I find R’s data plotting packages fairly arcane and poorly documented in online sources.