title: how to lapply to one column in a list of data tables
body: <p>I have a list of <code>dt</code> with same structure, some columns are <code>numeric</code> some <code>characters</code>.</p>
  
  <pre><code>dt1 &lt;- data.table(x = c(1:5), y = "test")  
  dt2 &lt;- data.table(x = c(1:5), y = "test")  
  mylist &lt;- list(A = dt1, B = dt2) 
  </code></pre>
  
  <p>I want to apply a function, say <code>sum</code> or <code>mean</code> that cannot be applied across the whole datatable because there are some <code>character</code> columns.</p>
  
  <p>I have tried different combinations of <code>lapply(mylist$y,sum)</code> or <code>lapply(mylist[2],sum)</code> but it doesn't work.</p>