title: Merging data frames without duplicating rows
body: <p>I would like to merge two data frames, but do not want to duplicate rows if there is more than one match. Instead I would like to sum the observations on that day.</p>
  
  <blockquote>
    <p><strong>From ?merge:</strong>  The rows in the two data frames that match on the specified columns are extracted, and joined together. <strong>If there is more than one match, all possible matches contribute one row each.</strong></p>
  </blockquote>
  
  <p>Here's some example code:</p>
  
  <pre><code>days &lt;- as.data.frame(as.Date(c("2012-1-1", "2012-1-2", "2012-1-3", "2012-1-4")))
  
  names(days) &lt;- "Date"
  obs.days &lt;- as.data.frame(as.Date(c("2012-1-2", "2012-1-3", "2012-1-3")))
  obs.days$count &lt;- 1
  colnames(obs.days) &lt;- c("Date", "Count")
  df &lt;- merge(days, obs.days, by.x="Date", by.y="Date", all.x=TRUE)
  </code></pre>
  
  <p>I would like the final data frame to only list 2012-1-3 one time with a count value of 2.</p>