title: R converting from short form to long form with counts in the short form
body: <p>I have a large table (~100M row and 28 columns) in the below format:</p>
  
  <pre><code>ID  A   B   C
  1   2   0   1
  2   0   1   0
  3   0   1   2
  4   1   0   0
  </code></pre>
  
  <p>Columns besides ID (which is unique) gives the counts for each type (i.e. A,B,C). I would like to convert this to the below long form. </p>
  
  <pre><code>ID  Type
   1   A
   1   A
   1   C
   2   B
   3   B
   3   C
   3   C
   4   A
  </code></pre>
  
  <p>I also would like to use data table (rather than data frame) given the size of my data set. I checked <code>reshape2</code> package in <code>R</code> regarding converting between long and short form however I am not clear if <code>melt</code> function would allow me to have counts in the short form as above. </p>
  
  <p>Any suggestions on how I can convert this in a fast and efficient way in <code>R</code> using <code>reshape2</code> and/or <code>data.table</code>?</p>