title: How to convert multiple rows into multiple columns in one row in r
body: <p>I have data in this form</p>
  
  <pre><code>         V1    V2
  
  1        6     1
  
  2        6     5
  
  3        1     0
  
  4        1     6
  
  5        1   385
  
  6        5     4
  
  7        5     6
  
  8        5    98
  
  9        0     1
  
  10       0     2
  </code></pre>
  
  <p>and I want to convert it into</p>
  
  <pre><code>         V1    V2    V3    V4
  
  1        6     1     5
  
  2        1     0     6     385
  
  3        5     4     6      98
  
  4        0     1     2
  </code></pre>
  
  <p>any suggestions to do it into r</p>