Today I decided that I would do a quick review of the book “R in a Nutshell: A Desktop Quick Reference, by Joseph Adler” published by O’Reilly. I have found this book very useful over the years. I still have it sitting on my shelf and reference it even now. This is a review of the first edition – so don’t crucify me if what I say is superseded by some later edition.
I would say that the book more than meets the aims outlined in the title, it is probably the most complete guide to R programming out there and a very good reference guide, but there is more to this book than that. It is a very good text for new comers to R as well a very good reference for those already experienced. It doesn’t matter if you are a programmer or a statistician; there is plenty of good stuff in this book for you.
The first two chapters are devoted to the installation of R and different ways to run it.
The third chapter is titled “A Short R Tutorial”. I really like this chapter because if you have never seen R code before it gives you a very good snapshot of a large range of activities that R programmers engage in. It gives a very light touch on lots of very important topics: basic operations, functions, variables, data structures, objects and classes, models and formulas, charts and graphics, and getting help. When working with base R, these are things that programmers do very regularly, it is essential basic R coding and it enables the reader to quickly go away and play with R after reading this short chapter. It gives the reader a good feel for what R code looks like and how it works, it also allows the reader to quickly assess whether R is the right kind of product for them or whether they prefer working in a different way. The third chapter also acts as a lovely anchor point for both the reader and the rest of the material in the book. The reader knows that they can always come back and reference simple things quickly without having to thumb through the whole book and the rest of the material in the book flows very nicely from this point.
The fourth chapter describes how to get, load, and the basics of building R packages while the fifth chapter described the R language. This chapter is where I learnt about the back-tick operator, it takes the covers off R a tiny bit exposing something of the internals. Chapter six on “R Syntax” flows very nicely from the R language chapter, this is where I discovered that you can actually create your own operators, which can be very convenient for exampling, creating your own custom logic operations.
As someone that spends a lot of time teaching R, I can attest to how important a firm grasp of data object types are in R and the seventh chapter does a good job of summarizing these.
The eighth chapter embodies the term “Nutshell” and touches on some basics of symbols, environments and error handling in R and chapter nine and ten offer a nice summary of functions and object oriented programming in R.
The main Data I/O chapter gives a good overview of common I/O methods and focuses a lot on text and database formats. I think however that there is room for including more in this chapter particularly when you compare it with the Data Import/Export R manual.
Chapters fourteen and fifteen are a very nice overview of base and lattice graphics in R. It is a very nice reference for beginners and forgetful people like me.
The rest of the book is a very nice collection of topics in statistical analysis in R and they are a very good reference for beginners.
In summary, this book certainly lives up to its title and offers the reader a very broad but still fairly detailed view of R. I think that any workplace where significant numbers of people write R code should certainly have a few copies of this book floating around; it is a very nice and compact guide. This first edition has 611 pages which is a lot but the book design makes it easy to hold and thumb through, the price is a bargain, regardless of whether you decided that you want a paper copy or something for your electronic device. My only criticism is the conspicuous absence of the history and philosophy of R in the introductory chapter(s) which can be useful to a beginner in appreciating why things are the way they are in this language; the book however never promises this, it is beautifully functional and an invaluable reference whether you are a beginner or an advanced programmer.