title: Dataframe: Order column contents matching first column
body: <p>I can't believe I'm struggling with this after just 3 years of taking a break from R...</p>
  <p>Basically, I'm having a dataframe where in the first column all possible values are listed. The subsequent columns have either one of the values or NA. I would love to sort every subsequent column in a way so that when it contains the value at some point, it shall be in the row where that value is in the first column.</p>
  <p>Probably easier to explain with an example:</p>
  <p>Original:</p>
  <pre><code>Letters Category1 Category2 Category3 Category4
  A       NA        A         NA        NA
  B       A         NA        NA        D
  C       NA        NA        NA        A
  D       NA        C         NA        NA
  E       E         B         C         NA
  </code></pre>
  <p>Desired state:</p>
  <pre><code>Letters Category1 Category2 Category3 Category4
  A       A         A         NA        A
  B       NA        B         NA        NA
  C       NA        C         C         NA
  D       NA        NA        NA        D
  E       E         NA        NA        NA
  </code></pre>
  <p>Am I overlooking a built-in function / library to do this elegantly? My approach would probably to build a function that creates a new dataframe and checks the contents row by row, but this seems very inefficient...</p>