endpoints (bug?) behavior in xts
- by Alex
If I try to get endpoints for every year, for example, and do the following:
xts.data <- xts(1:10000, order.by=seq(from=as.Date("1970-01-01"), by=1, len=10000))
z <- endpoints(xts.data, on="months", k=12)
The return value for this is:
> z
[1] 0 10000
Same with numbers higher than 12. Why would xts simply not return indices of every year or 13th month starting from the beginning. Is it limited by the number of periods in a year? That is if i did:
z <- endpoints(xts.data, on="weeks", k=54)
This seems to work fine.