title: Add together a list of matrices element-by-element
body: <p>I want to add together all matrices in a list.  Here is an example of what I'm trying to do:</p>
  
  <pre><code>## sets up the problem
  m1 &lt;- matrix(0,nrow=9,ncol=4)
  row.pres &lt;- lapply(1:4,function(x) seq(x,x+2))
  m1.l &lt;- lapply(1:4,function(y) {m1[row.pres[[y]],y] &lt;- 1
                          return(m1)}
         )
  </code></pre>
  
  <p>I want to add up  all the elements of <code>m1.l</code> to come up with a single matrix of the same dimension as each of them.  Here is my solution:</p>
  
  <pre><code>test &lt;- lapply(1:4,function(x) paste("m1.l[[",x,"]]",sep=''))
  add.all &lt;- paste(test,collapse="+")
  eval(parse(text=add.all))
  </code></pre>
  
  <p>But there must be a better way!  perhaps something via <code>do.call</code>?</p>