title: R transposing repeat records
body: <p>I have a data table that repeats records. I would like to transpose the table but into the unique record names. </p>
  
  <p>Below is a sample of the Data table:</p>
  
  <pre><code>V1  V2  id
  ClientID    29  1
  CheckID 201 1
  PaymentAmount   256 1
  Gross   301 1
  Net 256 1
  Invested    130 1
  Invested    53  1
  Invested    118 1
  ClientID    31  2
  CheckID 222 2
  PaymentAmount   41  2
  Gross   46  2
  Net 41  2
  Invested    46  2
  ClientID    43  3
  CheckID 310 3
  PaymentAmount   41  3
  Gross   46  3
  Net 41  3
  Invested    46  3
  </code></pre>
  
  <p>You can see from the table above that the record in X1 called "Investment" can occur more than once for a single ClientID. I'd like to transpose the data so that it looks as such:</p>
  
  <pre><code>ClientID    CheckID PaymentAmount   Gross   Net Invested    ID
  29  201 256 301 256 130 1
  29  201 256 301 256 53  1
  29  201 256 301 256 118 1
  31  222 41  46  41  46  2
  43  310 41  46  41  46  3
  43  310 41  46  41  48  3
  </code></pre>
  
  <p>any support is greatly appreciated!</p>