title: R multiple statistics for multiple columns with data.table
body: <p>I want the same results as in <a href="https://stackoverflow.com/questions/16513827/r-summarizing-multiple-columns-with-data-table">R summarizing multiple columns with data.table</a> but for several summary functions.</p>
  
  <p>Here is an example</p>
  
  <pre><code>data &lt;- as.data.table(list(x1 = runif(200), x2 = 10*runif(200), group = factor(sample(letters[1:2]))))
  
  res &lt;- data[, rbindlist(lapply(.SD, function(x) {
                return(list(name = "varname", mean = mean(x), sd = sd(x)))
             }))
            , by = group, .SDcols = c("x1", "x2")
            ]
  </code></pre>
  
  <p>And get the following result:</p>
  
  <pre><code>   group    name      mean        sd
  1:     b varname 0.5755798 0.2723767
  2:     b varname 5.5108886 2.7649262
  3:     a varname 0.4906111 0.3060961
  4:     a varname 4.7780189 2.9740149
  </code></pre>
  
  <p>How can I get column names ('x1', 'x2') in second column? I guess that I need to substitute <code>rbindlist</code> to something else, but what? Is there any simple solution?</p>