title: How do you apply a function to a nested list?
body: <p>I need to get the maximum of a variable in a nested list. For a certain station number "s" and a certain member "m", <code>mylist[[s]][[m]]</code> are of the form:</p>
  
  <pre><code>station date.time        member  bias
  6019    2011-08-06 12:00 mbr003  86
  6019    2011-08-06 13:00 mbr003  34
  </code></pre>
  
  <p>For each station, I need to get the maximum of <code>bias</code> of all members.  For <code>s = 3</code>, I managed to do it through:</p>
  
  <pre><code>library(plyr)
  var1 &lt;- mylist[[3]]
  var2 &lt;- lapply(var1, `[`, 4)
  var3 &lt;- laply(var2, .fun = max)
  max.value &lt;- max(var3)
  </code></pre>
  
  <p>Is there a way of avoiding the column number "4" in the second line and using the variable name <code>$bias</code> in <code>lapply</code> or a better way of doing it?</p>