title: Replacing certain values in data.frame in R
body: <p>I am trying to replace the NAs in "test" with the forecast values in "forecast".  I am trying to use match, but I can't figure it out. keep in mind the id and time create a two-part unique id.  Any suggestions?  ( keep in mind my data set is much larger than this example (rows=32000))</p>
  
  <pre><code>test = data.frame(id =c(1,1,1,2,2,2), time=c(89,99,109,89,99,109), data=c(3,4,NA,5,2,NA))
  forecast = data.frame(id =c(1,2), time=c(109,109), data=c(5,1))
  </code></pre>
  
  <p>Desired output</p>
  
  <pre><code>out = data.frame(id =c(1,1,1,2,2,2), time=c(89,99,109,89,99,109), data=c(3,4,5,5,2,1))
  </code></pre>