title: is there a way in R to turn values into columns then pull values from another column into those new columns?
body: <p>Not sure how to go about cleaning this dataset..
  Our database system exports reports by having the field names in one column and the field values in one column, for example:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Field Label 01</th>
  <th>Field Value 01</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Age</td>
  <td>11</td>
  </tr>
  <tr>
  <td>Proceeds</td>
  <td>4000</td>
  </tr>
  <tr>
  <td>Age</td>
  <td>4</td>
  </tr>
  <tr>
  <td>Proceeds</td>
  <td>1000</td>
  </tr>
  <tr>
  <td>Last Reported</td>
  <td>05-20-2021</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>My goal is to split the fields in column 1 to become their own columns but I also need to pull in the values from column 2 to.</p>
  <p>My expected outcome:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Age</th>
  <th>Proceeds</th>
  <th>Last Reported</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>11</td>
  <td>N/A</td>
  <td>N/A</td>
  </tr>
  <tr>
  <td>4</td>
  <td>N/A</td>
  <td>N/A</td>
  </tr>
  <tr>
  <td>N/A</td>
  <td>4000</td>
  <td>N/A</td>
  </tr>
  <tr>
  <td>N/A</td>
  <td>1000</td>
  <td>N/A</td>
  </tr>
  <tr>
  <td>N/A</td>
  <td>N/A</td>
  <td>05-20-2021</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I'm not entirely sure how to go about this. I'm new to data wrangling/cleaning and am vaguely familiar with using the tidyverse package.</p>
  <p>My plan is to turn the rownames in Field Label 01 into column names then for every instance of each category in Field Label 01 to take the value from Field Value 01 and place it to the right column.</p>
  <p>If Field Label 01 = &quot;Age&quot;, pull the value in Field Value 01 in the same row into the column Age.</p>
  <p>Any help is greatly appreciated!</p>