title: Merge returns duplicate rows
body: <p>I have a data frame df1:</p>
  
  <pre><code>Column1   Column2
   A            B
   A            C      
  </code></pre>
  
  <hr>
  
  <p>I want to merge with df2:</p>
  
  <pre><code>Code      Country    Continent
     A         x           e
     B         y           f
     C         z           g
  </code></pre>
  
  <p>To obtain:</p>
  
  <pre><code>Column1   Column2    Country1    Continent1
     A         B          x           e
     A         C          x           e
  </code></pre>
  
  <p>And do this again for the country in column2, to obtain country and continent for the column2.</p>
  
  <pre><code>Column1   Column2    Country1    Continent1   Country2    Continent2
     A         B          x           e             y            f
     A         C          x           e             z            g
  </code></pre>
  
  <p>Right now I am using the merge function:</p>
  
  <pre><code>df1&lt;- merge(df1,df2,by.x="Column1",by.y="Code")
  </code></pre>
  
  <p>But I obtain duplicate columns:</p>
  
  <pre><code>Column1   Column2    Country    Continent
     A         B          x           e
     A         B          x           e
     A         C          x           e
     A         C          x           e
  </code></pre>
  
  <p>I have tried all combinations of <code>all.x =TRUE</code>, etc.</p>
  
  <p>Is there a way to obtain the output I want? preferably with merge function or plyr...</p>
  
  <p>Thanks in advance</p>