title: Transfer values from one dataframe to another
body: <p>I have two data frames. The first looks like this:</p>
  
  <pre><code>value &lt;- seq(1, 100, length.out=20)
  df1 &lt;- data.frame(id=as.character(1:20), 
                    value=value, 
                    stringsAsFactors=F)
  </code></pre>
  
  <p>I have a second dataframe that looks like this</p>
  
  <pre><code>df2 &lt;- data.frame(id=as.character(c(1:5, 21:23)),
                    v2=NA, 
                    stringsAsFactors=F)
  </code></pre>
  
  <p>I need the values transferring from <code>df1</code> to <code>df2</code>, but only where <code>df1$id == df2$id</code>. So the dataframe I need is:</p>
  
  <pre><code>df2Needed &lt;- data.frame(id=as.character(c(1:5, 21:23)),
                        v2=c(value[1:5], NA, NA, NA),
                        stringsAsFactors=F)
  </code></pre>
  
  <p>Is there a way to do this?</p>