title: How to do a match in R with left_join using multiple columns and one "likely" column
body: <p>Im triying to do a match between two different data frames in R.</p>
  <p>For example one data frame looks like:</p>
  <pre><code>df1&lt;- data.frame(description=c(&quot;sol 100ml&quot;,&quot;200 mg&quot;,&quot;1.5 ml&quot;,&quot;10MG&quot;),
                   pa=c(&quot;clorbetazol&quot;,&quot;Milk&quot;,&quot;Aciclovir&quot;,&quot;AAC&quot;),
                   atc=c(&quot;x1&quot;,&quot;a2&quot;,&quot;a3&quot;,&quot;x3&quot;))
  
   description          pa atc
     sol 100ml clorbetazol  x1
        200 mg        Milk  a2
        1.5 ml   Aciclovir  a3
          10MG         AAC  x3
  </code></pre>
  <p>And the other one looks like:</p>
  <pre><code>df2 &lt;-data.frame(Concentration=c(&quot;100&quot;,&quot;200&quot;,&quot;1.5&quot;,&quot;10&quot;),
                   pa=c(&quot;clorbetazol&quot;,&quot;Milk&quot;,&quot;Aciclovir&quot;,&quot;AAC&quot;),
                   atc=c(&quot;x1&quot;,&quot;a2&quot;,&quot;a3&quot;,&quot;x3&quot;),
                   code=c(&quot;A101&quot;,&quot;A202&quot;,&quot;A303&quot;,&quot;A404&quot;))
  
    Concentration          pa atc code
              100 clorbetazol  x1 A101
              200        Milk  a2 A202
              1.5   Aciclovir  a3 A303
               10         AAC  x3 A404
  </code></pre>
  <p>My question is: There is a way to do a match with columns &quot;pa&quot;, &quot;atc&quot; and use &quot;concentration&quot; column in some way (use GREPL or something) to do left join o merge?</p>
  <p>Finally i want to get this:</p>
  <pre><code> description          pa atc  code
     sol 100ml clorbetazol  x1  A101
        200 mg        Milk  a2  A202
        1.5 ml   Aciclovir  a3  A303
          10MG         AAC  x3  A404
  </code></pre>
  <p>I wonder if someone can help me.</p>
  <p>Thanks!</p>