title: Sum between two weeks interval
body: <p>Suppose I have a daily rain data.frame like this:</p>
  
  <pre><code>df.meteoro = data.frame(Dates = seq(as.Date("2017/1/19"), as.Date("2018/1/18"), "days"),
                       rain = rnorm(length(seq(as.Date("2017/1/19"), as.Date("2018/1/18"), "days"))))
  </code></pre>
  
  <p>I'm trying to sum the accumulated rain between a 14 days interval with this code:</p>
  
  <pre><code>library(tidyverse)
  library(lubridate)
  
  df.rain &lt;- df.meteoro %&gt;% 
    mutate(TwoWeeks = round_date(df.meteoro$data, "14 days")) %&gt;%
    group_by(TwoWeeks) %&gt;%
    summarise(sum_rain = sum(rain))
  </code></pre>
  
  <p>The problem is that it isn't starting on 2017-01-19 but on 2017-01-15 and I was expecting my output dates to be:</p>
  
  <pre><code>"2017-02-02" "2017-02-16" "2017-03-02" "2017-03-16" "2017-03-30" "2017-04-13"
  "2017-04-27" "2017-05-11" "2017-05-25" "2017-06-08" "2017-06-22" "2017-07-06" "2017-07-20"
  "2017-08-03" "2017-08-17" "2017-08-31" "2017-09-14" "2017-09-28" "2017-10-12" "2017-10-26"
  "2017-11-09" "2017-11-23" "2017-12-07" "2017-12-21" "2018-01-04" "2018-01-18"
  </code></pre>
  
  <p>TL;DR I have a year long daily rain data.frame and want to sum the accumulate rain for the dates above.</p>
  
  <p>Please help.</p>