title: R - Transposing portions of a data frame
body: <p>I have a .dbf file I exported from ArcGIS 10.1 and I need to reorganize the it. An example of the data is:</p>
  
  <pre><code>       V1               V2
  40.000000000000000 41.000000000000000
  
  40.000000000000000 42.000000000000000
  
  41.000000000000000 40.000000000000000
  
  41.000000000000000 42.000000000000000
  
  41.000000000000000 43.000000000000000
  
  42.000000000000000 40.000000000000000
  
  42.000000000000000 41.000000000000000
  
  42.000000000000000 43.000000000000000
  
  43.000000000000000 41.000000000000000
  
  43.000000000000000 42.000000000000000
  </code></pre>
  
  <p>I need the data in a format where there is only one row for each unique value in the first column, with all of the corresponding values from the second column now appearing in that row, for example:</p>
  
  <pre><code>  V1                   V2              V3                  V4
  40.000000000000000 41.000000000000000 42.000000000000000
  
  41.000000000000000 40.000000000000000 42.000000000000000 43.000000000000000
  
  42.000000000000000 40.000000000000000 41.000000000000000 43.000000000000000
  
  43.000000000000000 41.000000000000000 42.000000000000000
  </code></pre>
  
  <p>If anyone can help me with this problem I would appreciate it. Thanks!</p>