title: ggplot2: Define plot layout with grid.arrange() as argument of do.call()
body: <p>I want to obtained an unbalanced grid of plots such as</p>
  
  <pre><code>require(ggplot2)
  require(gridExtra)
  
  df &lt;- data.frame(value1 = rnorm(200),
                   value2 = rnorm(200),
                   value3 = rnorm(200),
                   value4 = rnorm(200))
  
  p1 &lt;- ggplot(df) + geom_density(aes(x=value1))
  p2 &lt;- ggplot(df) + geom_density(aes(x=value2))
  p3 &lt;- ggplot(df) + geom_density(aes(x=value3))
  p4 &lt;- ggplot(df) + geom_density(aes(x=value4))
  
  grid.arrange(p1, arrangeGrob(p2,p3,p4, ncol=3), heights=c(2.5/4, 1.5/4), ncol=1)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/fmcV7.png" alt="enter image description here"></p>
  
  <p>but using a function </p>
  
  <pre><code>myplot &lt;- function(i){
    p &lt;- ggplot(df) + geom_density(aes_string(x=i))
    return(p)
  }
  </code></pre>
  
  <p>and an <code>lapply</code> call</p>
  
  <pre><code>p &lt;- lapply(c("value1","value2","value3","value4"), myplot)
  do.call(grid.arrange, c(p))
  </code></pre>
  
  <p>In this case <code>grid.arrange</code> distribute the plots in a 2 by 2 matrix. But I want to obtain an unbalanced layout as  with </p>
  
  <pre><code>grid.arrange(p1, arrangeGrob(p2,p3,p4, ncol=3), heights=c(2.5/4, 1.5/4), ncol=1)
  </code></pre>