For example if I create the following xts object: index <- seq(from = Sys.Date(), by = "day", length.out = 100) xts_object <- xts(rnorm(100), order.by = index)
I can split into one-month period with the "split" function: list_object <- split(xts_object, f = "months")
And I can find the endpoints in my index that correspond to the last by-monthly points with "endpoints": endpoints <- endpoints(xts_object, on = "months", k = 2)
But I how can I split my time series based on those endpoints?
Your help is greatly appreciated!