hadley/ggplot2 — pull request #962 by richierocks (2014-05-11 08:50:57+00:00)
Title: Added sanitise_dim function for Issue #801

As discussed in issue [#801](https://github.com/hadley/ggplot2/issues/801), `facet_wrap` doesn't properly check the `nrow` and `ncol` arguments, particularly negative values.

I've added a `sanitise_dim` function (plus some tests) to deal with this.