title: Manipulate a data frame in R
body: <p>I have a table that looks like this: </p>
  
  <pre><code>id  pop  fre
  A:1 sh   0.6
  A:1 mi   0.2
  A:2 sh   0.9
  A:3 mi   0.5
  </code></pre>
  
  <p>What I want is creating a new table with the second column (pop) as a column names and values of (id) column without repetition. The corresponding values of (fre) column is to be used for filling the table. As an example the above table might looks like this:</p>
  
  <pre><code>id    sh    mi
  A:1   0.6  0.2
  A:2   0.9  NA
  A:3   NA   0.5
  </code></pre>
  
  <p>I tried to use reshape function in R, however I keep getting an error about data-frame columns. I appreciate any ideas that might help.</p>