r - Generic XTS Endpoints Function -


is there function returns index integer increment of time? xts, there 'days', 'weekdays', etc. if want 2 days, 6 days?

the endpoints function has argument (k) this:

library(xts) data(sample_matrix) x <- as.xts(sample_matrix) endpoints(x, "months") # [1]   0  30  58  89 119 150 180 endpoints(x, "months", k=2) # [1]   0  58 119 180 endpoints(x, "months", k=3) # [1]   0  89 180