## create time sequence
x <- timeSequence(from = "2001-01-01", to = "2009-01-01", by = "day")
## generate periods
periods(x, "12m", "1m")
periods(x, "52w", "4w")
## roll periodically
periodicallyRolling(x)
## roll monthly
monthlyRolling(x)
Run the code above in your browser using DataLab