title: Can I print something while grouping a data.table?
body: <p>Let's say I have this data.table:</p>
  
  <pre><code>dt=data.table(ID=letters[seq(3,8)],category=rep(c('a','b'),each=3),value=seq(1,6))
  </code></pre>
  
  <p>I want to get the relative percentage of the value of each register relative to the sum of all values in a category. Besides that, I would like to print the category for debugging reasons. It would be something like this:</p>
  
  <pre><code>dt[,print(.BY[["category"]]),
      list(relative=value/sum(dt[category==.BY[["category"]],value],
      by='ID')
  </code></pre>
  
  <p>Thank you</p>