title: merging on multiple columns R
body: <p>I'm surprised if this isn't a duplicate, but I couldn't find the answer anywhere else.</p>
  
  <p>I have two data frames, <code>data1</code> and <code>data2</code>, that differ in one column, but the rest of the columns are the same. I would like to merge them on a unique identifying column, <code>id</code>. However, in the event an ID from <code>data2</code> does not have a match in <code>data1</code>, I want the entry in <code>data2</code> to be appended at the bottom, similar to <code>plyr::rbind.fill()</code> rather than renaming all the corresponding columns in data2 as <code>column1.x</code> and <code>column1.y</code>. I realize this isn't the clearest explanation, maybe I shouldn't be working on a Saturday. Here is code to create the two dataframes, and the desired output:</p>
  
  <pre><code>spp1 &lt;- c('A','B','C')
  spp2 &lt;- c('B','C','D')
  trait.1 &lt;- rep(1.1,length(spp1))
  trait.2 &lt;- rep(2.0,length(spp2))
  id_1 &lt;- c(1,2,3)
  id_2 &lt;- c(2,9,7)
  
  data1 &lt;- data.frame(spp1,trait.1,id_1)
  data2 &lt;- data.frame(spp2,trait.2,id_2)
  colnames(data1) &lt;- c('spp','trait.1','id')
  colnames(data2) &lt;- c('spp','trait.2','id')
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>  spp trait.1 trait.2 id
  1   A     1.1      NA  1
  2   B     1.1       2  2
  3   C     1.1      NA  3
  4   C      NA       2  9
  5   D      NA       2  7
  </code></pre>