title: grid.arrange using list of plots
body: <p>I feel I'm always asking a variation of the same question :(</p>
  
  <p>I recently got a list of plots + table to display on grid.arrange using the do.call function</p>
  
  <pre><code>library(grid)
  library(ggplot2)
  library(gridExtra)
  
  g1 &lt;- ggplot(data.frame(x=c(0, 10)), aes(x)) + stat_function(fun=sin)
  g2 &lt;- ggplot(data.frame(x=c(0, 10)), aes(x)) + stat_function(fun=tan)
  g3 &lt;- ggplot(data.frame(x=c(0, 10)), aes(x)) + stat_function(fun=cos)
  g4 &lt;- tableGrob(data.frame(x &lt;- 1:10, y&lt;-2:11, z&lt;-3:12))
  
  plist &lt;- list(g1,g2,g3,g4)
  do.call("grid.arrange", c(plist))
  </code></pre>
  
  <p>This works but I need "plist" to be generated based on the variable "numruns"
  I've tried this, but it does not work:</p>
  
  <pre><code>plist2 &lt;- list(paste0("g", seq_len(numruns+1)))
  do.call("grid.arrange", c(plist2))
  </code></pre>
  
  <p>I believe what I'm doing is calling grid.arrange("g1","g2", ...) rather than grid.arrange(g1,g2, ...).
  I solved a similar problem before using lapply, but that doesn't seem to help me in this case, or else I'm using it incorrectly.</p>
  
  <p>Thanks for any help.</p>