title: Efficient alternatives to merge for larger data.frames R
body: <p>I am looking for an efficient (both computer resource wise and learning/implementation wise) method to merge two larger (size>1 million  / 300 KB RData file) data frames.</p>
  
  <p>"merge" in base R and "join" in plyr appear to use up all my memory effectively crashing my system.</p>
  
  <p>Example<br>
  load <a href="https://github.com/edielivon/Useful-R-functions/raw/master/Example%20files/test.RData" rel="noreferrer">test data frame</a></p>
  
  <p>and try</p>
  
  <pre><code>test.merged&lt;-merge(test, test)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>test.merged&lt;-join(test, test, type="all")  
  </code></pre>
  
  <ul>
  - 
  </ul>
  
  <hr>
  
  <p>The following post provides a list of merge and alternatives:<br>
  <a href="https://stackoverflow.com/questions/1299871/how-to-join-data-frames-in-r-inner-outer-left-right">How to join (merge) data frames (inner, outer, left, right)?</a></p>
  
  <p>The following allows object size inspection:<br>
  <a href="https://heuristically.wordpress.com/2010/01/04/r-memory-usage-statistics-variable/" rel="noreferrer">https://heuristically.wordpress.com/2010/01/04/r-memory-usage-statistics-variable/</a></p>
  
  <p>Data produced by <a href="https://stackoverflow.com/questions/10454973/how-to-create-example-data-set-from-private-data-replacing-variable-names-and-l/10458688#10458688">anonym</a></p>