Babylonian confusion or flexibility?

[This article was first published on Statistical Graphics and more » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

As we are used from UNIX. there is not one single suitable solution to solve a problem, but usually a few different ways to do “the same”. Depending on what commands we know (best), we will chose the one or the other solution. Only the absolute expert will be able to choose the most efficient commands.

There is a similar situation with R’s graphics (and probably for methods from other domains as well). Let’s look at a simple example like the histogram (I use the Old Faithful Geyser Data here as example).

  • there is the good old hist which gives

  • from the mass library we get the truehist which plots densities

    and apparently brings in some more truth, as the bars are different with the same underlying breaks.

  • the library lattice provides histogram looking like this

  • we skip gghistogram from the ggplot library and immediately move to
  • qplot from ggplot2, which is actually a call to
    qplot(eruptions, data = faithful, geom="histogram")

    (compared to hist(faithful$eruptions))

  • Finally, for those who like things more interactive, there is ihist from the iplots library

I don’t claim that this list is complete, but I think it nicely shows “the problem”. Of course, a “real R programmer” can make any of the plots look like one of the others … The question is more, which of the implementations beyond hist from the base library graphics really adds value to what we already had? The second question probably is, how R will ever resolve the backwards compatibility spiral that might make it look like a real legacy project some time – not to mention the package quality issue?

To leave a comment for the author, please follow the link and comment on their blog: Statistical Graphics and more » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)