Review of “R Graphs Cookbook” by Hrishi Mittal

Executive summary: Extremely useful for new users, informative to even quite seasoned users.

Refereeing

Once upon a time a publisher asked if I would referee a book (unspecified) about R.  In an instance that can only be described as psychotic I said yes.  That bit of insanity turned out to be a good thing.

I was treated to chapters of a cookbook on R graphics doled out in installments, like how Thackeray’s Vanity Fair was originally published.

It is fairly embarrassing how much I learned from the book.

The format

All you need to know about each task is presented in specific sections:

  • The task: what is to be done
  • Getting ready: packages that might need to be attached, for instance
  • How to do it …: the R code
  • How it works …: a brief explanation of what the code means
  • There’s more …: variations on the theme

You only need to get your own data into R in order to get similar plots that you care about.

Downside

The graphs are in black and white, not color — at least in the hardcopy version.  Heatmaps in grayscale are suboptimal.  The Panglossian view is that this will encourage readers to create the graphs themselves.

I made an effort to rid the book of the L-word when “package” is meant.  The L-word is “library” (see Some quibbles about “The R Book” and its comments for more on this).  Alas, I failed.  I fear I’ll be expelled from the JaRgon Police Force.

Getting it

You can go to the R Graphs Cookbook webpage.

Subscribe to the Portfolio Probe blog by Email

This entry was posted in Book review, R language and tagged , . Bookmark the permalink.

3 Responses to Review of “R Graphs Cookbook” by Hrishi Mittal

  1. Barry R says:

    Not much of a review is it?

    Anyway, the plots are in grayscale in the PDF sample chapter – the only thing in colour being the link to the web site in each page’s footer.

    Also it would be better called “The R Base Graphics Cookbook”, since there’s no lattice graphics and no ggplot which I am told all the cool kids are using these days.

    I’d be interested to know what is taught in the chapter on maps, since this is a rapidly changing area.

    • Pat says:

      There is some ggplot2, but yes more might be better. I don’t know why there isn’t more, but an argument is that talking just about one system is much less confusing to novices who are (I presume) the main target group.

      What the book does really well is show people who don’t know anything about R how to get plots that they might want. After they are hooked might be a better time for them to addle their brains with the complexities of R graphics.

      Lattice is indeed essentially missing.

      The first chapter talks about the ‘maps’ package. The Maps chapter talks about packages: ‘WDI’, ‘sp’, ‘rgdal’, ‘RgoogleMaps’, ‘maptools’. Given the format of the book, none of these is shown in much depth.

  2. Pat says:

    Given the subject matter, I should have had a link to the R graph gallery: http://addictedtor.free.fr/graphiques/

Leave a Reply

Your email address will not be published.