title: ddply to multiple columns equivalent in data.table
body: <p>I am a big fan of the data.table package and I am having trouble converting some code in ddply of the plyr package into the equivalent in a data.table.  The code for ddply is:</p>
  
  <pre><code>dfx &lt;- data.frame(
    group = c(rep('A', 8), rep('B', 15), rep('C', 6)),
    sex = sample(c("M", "F"), size = 29, replace = TRUE),
    age = runif(n = 29, min = 18, max = 54),
    age2 = runif(n = 29, min = 18, max = 54)
  )
  
  ddply(dfx, .(group, sex), numcolwise(sum))
  </code></pre>
  
  <p>What I want to do is sum across multiple columns without having to manually specify the column names.  The manual equivalent in the data.table package is:</p>
  
  <pre><code>dfx.dt = data.table(dfx)
  dfx.dt[ , sum.age := sum(age), by="group,sex"]
  dfx.dt[ , sum.age2 := sum(age2), by="group,sex"]
  dfx.dt[!duplicated(dfx.dt[ , {list(group, sex)}]), ]
  </code></pre>
  
  <p>To be explicit, my question is "is there a way to do the equivalent of the ddply code in data.table?"</p>
  
  <p>Any help is greatly appreciated, thanks.</p>