title: How to subtract months from a date in R?
body: <p>I'm trying to subtract <strong>n</strong> months from a date as follows:</p>
  
  <pre><code>maturity &lt;- as.Date("2012/12/31")
  
  m &lt;- as.POSIXlt(maturity)
  
  m$mon &lt;- m$mon - 6
  </code></pre>
  
  <p>but the resulting date is <code>01-Jul-2012</code>, and not <code>30-Jun-2012</code>, as I should expect.
  Is there any short way to get such result?</p>
  
  <p>Thanks in advance</p>