Review of “R Graphs Cookbook” by Hrishi Mittal

January 24, 2011

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

Latest posts

Leave a Reply

  1. Barry R 2011-01-25 at 10:16 - Reply

    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 2011-01-25 at 11:16 - Reply

      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 2011-02-03 at 12:19 - Reply

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

Related posts

  • October 14, 2013

    What good are the skewness and kurtosis of portfolios? Previously The post "Cross-sectional skewness and kurtosis: stocks and portfolios" looked at skewness and kurtosis in portfolios.  The key difference [...]

  • October 7, 2013

    Get data that fit before you fit data. Why verify? Garbage in, garbage out. How to verify The example data used here is daily (adjusted) prices of stocks.  By [...]

  • September 23, 2013

    The subtitle is "Organizational Design, Risk, and Value Creation". Executive summary This should be a business book bestseller -- it simply and clearly explains the process of value creation. [...]