On Wed, Oct 12, 2011 at 9:12 AM, ecoc <liting...@gmail.com> wrote: > This doesn't work becaues the rollappy is non-overlapping. My rolling step is > 1-day and rolling window is 1-year, so there is 364 days overlapping. >
Its not the case that rollapply is non-overlapping. rollapply by default calls the function on a stretch of data moving ahead by 1 each time so it does overlap. Also you can use by= to cause it to move ahead by some other number if you wish. Also by setting by= appropriately you can get it to not overlap at all if you wish. Also depending on what your problem is you may be able to handle variations in the function itself, e.g. removing NAs. I suggest you give a small reproducible example showing what you have and what you want in order to clarify. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.