title: R - Add values to data frame matching a certain criteria
body: <p>I have the following two data frames:</p>
  
  <pre><code>d &lt;- data.frame(c1 = c("A","A","B","C","A","C","D","D"))
  
  map &lt;- data.frame(c1 = c("A","B","C","D"), c2 = c(12,14,16,25))
  </code></pre>
  
  <p>How can I add another column called "match" to data frame d that contains corresponding values found in data frame map? So data frame d should look like:</p>
  
  <pre><code>A 12
  A 12
  B 14
  C 16
  A 12
  C 16
  D 25
  D 25
  </code></pre>
  
  <p>Many thanks in advance!</p>