title: Converting factor levels to column names
body: <p>Let's assume that I have the following data set (named data set):</p>
  
  <pre><code>id  type    count
  1   typeA   10
  1   typeB   20
  1   typeC   30
  2   typeA   15
  2   typeB   15
  3   typeC   20
  </code></pre>
  
  <p>What will be the R code that'll produce the following table:</p>
  
  <pre><code>id  type_A  type_B  type_C
  1   10       20       30
  2   15       15       na
  3   na       na       20
  </code></pre>