I have a weekly data set which roughly covers 11 years. The problem is that not every week begins on the 1st of the month, and not every week ends on the 7th of the month.
I tried to create a sequence for 1 month in weeks to see the corresponding dates, however the month of January (which is 31 days) ends on the 29th:
seq(as.Date("2004-01-01"), as.Date("2004-01-31"), 'weeks')
[1] "2004-01-01" "2004-01-08" "2004-01-15" "2004-01-22" "2004-01-29"
I need to create a sequence of weekly dates whereby each week of each month begins on the 1st and ends on either the 28th (for Feb), 30 or 31 (for others). Is this even possible? Any assistance is greatly appreciated.