title: Comparation between elements in two data frames
body: <p>I'd like to compare the elements <code>a1</code> in <code>df1</code> to <code>a2</code> in <code>df2</code> and put on element of <code>b1</code> in <code>b2</code>. For example, <code>df1[2, 1] == df2[3,1]</code> then, <code>df2[3,1] &lt;- df1[2,1]</code>.</p>
  
  <pre><code>set.seed(1)
  a1 &lt;- letters
  b1 &lt;- rnorm(length(a1))
  
  a2 &lt;- sample(letters, 26, replace = T)
  b2 &lt;- rep(0, length(a1))
  
  df1 &lt;- data.frame(a1, b1)
  df2 &lt;- data.frame(a2, b2)
  </code></pre>
  
  <p>OBS.: This question is different of <a href="https://stackoverflow.com/questions/41170574/match-function-in-r">MATCH function in r</a>.
  In my question, the data frame <code>df1</code> presents only one kind of letters, but <code>df2</code> presents repeated letters.</p>