title: Mean of vector inside of list of lists
body: <p>I have a list of lists with the following structure:</p>
  
  <pre><code>&gt; mylist &lt;- list(list(a=as.numeric(1:3), b=as.numeric(4:6)), 
                   list(a=as.numeric(6:8), b=as.numeric(7:9)))
  &gt; str(mylist)
  List of 2
   $ :List of 2
    ..$ a: num [1:3] 1 2 3
    ..$ b: num [1:3] 4 5 6
   $ :List of 2
    ..$ a: num [1:3] 6 7 8
    ..$ b: num [1:3] 7 8 9
  </code></pre>
  
  <p>I would like to get the element-wise mean between the vectors <code>a</code> and <code>b</code> of <code>mylist</code>. For the vector <code>a</code>, the result would be this:</p>
  
  <pre><code>&gt; a
  [1] 3.5 4.5 5.5
  </code></pre>
  
  <p>I know the functions <code>lapply</code>, <code>rbind</code> and <code>colMeans</code> but I can't solve the problem with them. How can I achieve what I need?</p>