title: Conditional filling of rows
body: <p>I'm sure this is simple but it (and a raging cold) has me stumped at the moment.  I have the following list, C1 &amp; C2.  I want to remove the x's, replacing them with the other letter associated via the C1 number, giving the Desired C2 column result.  The non-x value will always be in the first position.</p>
  
  <pre><code>   C1 C2 DesiredC2
  1   1  A         A
  2   1  A         A
  3   1  x         A
  4   1  A         A
  5   1  x         A
  6   2  B         B
  7   2  B         B
  8   2  x         B
  9   3  C         C
  10  3  x         C
  </code></pre>
  
  <p>The dput() version of the first two columns is:</p>
  
  <pre><code>df2 &lt;- structure(list(C1 = c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L), 
  C2 = c("A", "A", "x", "A", "x", "B", "B", "x", "C", "x"), 
  X = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA)), .Names = c("C1","C2", "X"), class = "data.frame", row.names = c(NA, -10L))
  </code></pre>
  
  <p>Thank you.</p>