title: duplicate rows in my counting by group with data.table in R
body: <p>I'm really sorry to ask this dumb question but I don't get what is going wrong.
  I have a dataset which I convert into a data.table object :</p>
  
  <pre><code>#generate 100,000 ids associated to a group in a data-set called base
  id=c(1:100000)
  group=sample(c(1:5),100000,TRUE)
  base=cbind(id,group)
  base=as.data.table(base)
  </code></pre>
  
  <p>I make a basic group by computation to get the number of rows by group, and the result table still contains the same number of rows</p>
  
  <pre><code>counting=base[,COUNT:= .N, by = group]
  nrow(counting)
  #100000
  </code></pre>
  
  <p>What did I miss? Is there an option in data.table in order to address my problem?</p>