title: How to merge multiple data frames based on two columns?
body: <p>I have multiple data frames for data collected over 4 days. Each of the data frames looks like this (put very simply):</p>
  
  <pre><code>Lat           Long       PM
  -33.9174    151.2263     8
  -33.9175    151.2264     10 
  -33.9176    151.2265     9
  -33.9177    151.2266     8
  </code></pre>
  
  <p>I want to merge multiple data frames based on their matching Long and Lat values, to average out all 'PM' values at a particular location. The end result will look something like this (for the 13th - 16th Feb):</p>
  
  <pre><code>Lat         Long    PM.13th Feb  PM.14th Feb  PM.15th Feb   **Mean**
  -33.9174   151.2263     8            9           11         9.33
  -33.9175   151.2264     10           11          12          11
  -33.9176   151.2265     9            14          13          12
  -33.9177   151.2266     8            10          11         9.66
  </code></pre>
  
  <p>I understand that merging 2 data frames is easy enough:</p>
  
  <pre><code>df = merge(data1, data2, by.x = c("Lat", "Long"), by.y = c("Lat", "Long"))
  </code></pre>
  
  <p>But how do I merge multiple dataframes based on matching Longitude and Latitude values?</p>
  
  <p>Also, is there a way I can filter the data so that it will match up data which is within 0.001 Lat/Long value of each other? (Currently I am rounding the Lat/Long data to 3 decimal places, but it is duplicating my data).</p>