expanding R data.table by splitting on one column : <p>I have an R <code>data.table</code> like this:</p>

<pre><code>&gt; old_table
     id  values
  1:  1   A,B,C
  2:  2     D,E
  3:  3       F
  4:  4 G,H,I,J
</code></pre>

<p>I want to expand the table by splitting up the values column by commas (,) like so:</p>

<pre><code>&gt; new_table
     id value
  1:  1     A
  2:  1     B
  3:  1     C
  4:  2     D
  5:  2     E
  6:  3     F
  7:  4     G
  7:  4     H
  7:  4     I
  7:  4     J
</code></pre>

<p>Is there an easy way to do this?</p>
