title: marrangeGrob giving error for nrow
body: <p>I'm trying to create a bunch of ggplot2 plots using a for loop and then saving them on a multi-page pdf document, and I'm having trouble with marrangeGrob. Here's some example code:</p>
  
  <pre><code> Plots &lt;- list()
   Plots[[1]] &lt;- qplot(mtcars$mpg, mtcars$wt)
   Plots[[2]] &lt;- qplot(mtcars$cyl, mtcars$wt)
   Plots[[3]] &lt;- qplot(mtcars$mpg, mtcars$qsec)
   Plots[[4]] &lt;- qplot(mtcars$cyl, mtcars$drat)
  
   # install.packages("gridExtra", dependencies = TRUE)
   library(gridExtra)
  
   MyPlots &lt;- do.call(marrangeGrob, c(Plots, nrow = 1, ncol = 2))
   ggsave("My plots on multiple pages.pdf", MyPlots)
  </code></pre>
  
  <p>I've used similar versions of the <code>do.call(marrangeGrob...</code> line in the past and had them work, but now, I get this error when I try to execute that line: <code>Error: nrow * ncol &gt;= n is not TRUE</code>. The fact that code similar to this used to work makes me think that something in one of these packages has since been updated. Any suggestions on how to fix this? </p>