title: Find unique values and then retrieve all associated values
body: <p>So i am trying to convert a file with over a million rows which looks like below for example:</p>
  
  <pre><code>A 1
  
  B 7
  
  A 15
  
  B 2
  
  D 25
  
  A 3
  
  C 12
  
  B 9
  </code></pre>
  
  <p>But with a lot more rows. I want to convert this data frame into the format below:</p>
  
  <pre><code>A 1 15 3
  
  B 7 2 9
  
  C 12
  
  D 25
  </code></pre>
  
  <p>I've used this so far: </p>
  
  <pre><code>subset(rawdata, !duplicated(rawdata$Col1)) 
  </code></pre>
  
  <p>where rawdata is the dataset. But this just gives the first corresponding value associated with each unique column. </p>