title: rollapply() by n-months
body: <p>I am looking for a way to use rollapply to split a series into sequences by n-months. Suppose you have the following:</p>
  
  <pre><code>z &lt;- zoo(101:465, as.Date(1:365))
  as.data.frame(z)
  </code></pre>
  
  <p>I would like to get a list of vectors (or lists) of index values for each n-months so I can work on the data... Much like the width parameter is implemented in rollapply except the width in this case is variable (depending on the days in a month).</p>
  
  <p>NOTE: would prefer a base-R solution but would be interesting to see other libraries that can be used</p>