title: How to convert the values in one column into new columns, the values in another column into rows, indexing values in a third column?
body: <p>Suppose I have the following <code>data.table</code> in <code>R</code>:</p>
  <pre><code>&gt; data.table(Group = c(rep(1, 5), rep(2,5), rep(3,5)), Type = c(&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;E&quot;), Value = c(1:15))
  
      Group Type Value
   1:     1    A     1
   2:     1    B     2
   3:     1    C     3
   4:     1    D     4
   5:     1    E     5
   6:     2    A     6
   7:     2    B     7
   8:     2    C     8
   9:     2    D     9
  10:     2    E    10
  11:     3    A    11
  12:     3    B    12
  13:     3    C    13
  14:     3    D    14
  15:     3    E    15
  </code></pre>
  <p>I would like to create a new data table where I have:</p>
  <pre><code>&gt; dat &lt;- data.table(A = c(1,6,11), B = c(2,7,12), C = c(3,8,13), D = c(4,9,14), E = c(5,10,15))
  &gt; rownames(dat) &lt;- c(&quot;1&quot;,&quot;2&quot;,&quot;3&quot;)
  &gt; dat
      A  B  C  D  E
  1:  1  2  3  4  5
  2:  6  7  8  9 10
  3: 11 12 13 14 15
  </code></pre>
  <p>where the rownames are now the <code>Group</code> values, the <code>Type</code> the column names, with the entries being the corresponding values from <code>Values</code>. Is there a way to do this using a function in <code>data.table</code>?</p>