title: R: how to merge 2 data frames by column name
body: <pre><code>apple = data.frame(Obs = c(1:4), Color = c("red", "red", "red", "green"), Weight = c(1.1, 1.2, 1.3, 1.4))
  orange = data.frame(Obs = c(1:6), Weight = c(2, 3, 4, 5, 6, 7))
  </code></pre>
  
  <p>I have two data.frames, <code>apple</code> and <code>orange</code>, in which the latter's columns are a subset of the former's. </p>
  
  <pre><code>&gt; apple
    Obs Color Weight
  1   1   red    1.1
  2   2   red    1.2
  3   3   red    1.3
  4   4 green    1.4
  &gt; orange
    Obs Weight
  1   1      2
  2   2      3
  3   3      4
  4   4      5
  5   5      6
  6   6      7
  </code></pre>
  
  <p>I would like to merge the 2 data.frames and the result should look something like this:</p>
  
  <pre><code>&gt; apple_orange
        Obs Color Weight
      1   1   red    1.1
      2   2   red    1.2
      3   3   red    1.3
      4   4 green    1.4
      5   1    NA     2
      6   2    NA     3
      7   3    NA     4
      8   4    NA     5
      9   5    NA     6
      10  6    NA     7
  </code></pre>
  
  <p>What's a way to merge this so that I do not have the specify the specific column names? I.e. my actual dataset has hundreds of columns in common, so I'd rather not type them out one by one.</p>