title: Unable to generate sequence of dates by quarter properly in R
body: <p>I would like to generate a sequence of dates by quarter backwards from a given date (31 July 2015). Instead of getting the last day of April, I get the first day of May as below:</p>
  
  <pre><code>&gt; seq(as.Date('2015-07-31'), as.Date('2014-09-30'), by = '-3 month')
  [1] "2015-07-31" "2015-05-01" "2015-01-31" "2014-10-31"
  </code></pre>
  
  <p>I also tried passing <code>-quarter</code> in the <code>by</code> option but I got the following error:</p>
  
  <pre><code>&gt; seq(as.Date('2015-07-31'), as.Date('2014-09-30'), by = '-quarter')
  Error in seq.Date(as.Date("2015-07-31"), as.Date("2014-09-30"), by = "-quarter") : 
  invalid string for 'by'
  </code></pre>
  
  <p>While I can check the day of the month and correct accordingly should the dates have been over-adjusted into the wrong month, I was wondering if there exists a parsimonious snippet of code to do the above?</p>