title: Replacing rows from one data frame with rows from another data frame
body: <p>I have 2 data frames, one of which contains a missing value. The first data frame is as follows:</p>
  
  <pre><code>data &lt;- data.frame(Name = c("Dex","Dex","Rex","Rex","Rex","Lex","Lex","Nex","Nex","Nex"),
                     Year = c(2000, 2001, 2000, 2001, 2002, 2001, 2002, NA, 2001, 2002))
  
  # Name  Year
  # DEX   2000
  # DEX   2001
  # REX   2000
  # REX   2002
  # REX   2002
  # LEX   2001
  # LEX   2002
  # NEX    NA
  # NEX   2001
  # NEX   2002
  </code></pre>
  
  <p>The second data frame:</p>
  
  <pre><code>data1 &lt;- data.frame(Name = c("Nex","Nex","Nex"), Year = c(2000, 2001, 2002))
  
  # Name  Year
  # NEX   2000
  # NEX   2001
  # NEX   2002
  </code></pre>
  
  <p>I would like to replace the missing value in the data frame <code>data</code> with the appropriately placed value from data frame <code>data1</code>.</p>
  
  <p>The result should be:</p>
  
  <pre><code># Name  Year
  # DEX   2000
  # DEX   2001
  # REX   2000
  # REX   2002
  # REX   2002
  # LEX   2001
  # LEX   2002
  # NEX   2000
  # NEX   2001
  # NEX   2002
  </code></pre>
  
  <p>It seems that it would be easiest to either replace the 3 rows called NEX in <code>data</code> with the 3 rows in <code>data1</code> or to somehow merge the 2 data frames such that the rows in <code>data1</code> are merged with the appropriate rows of <code>data</code>. However, I'm at a loss for how to do this. </p>