How to generate the sequence of dates

Hi all,

This may be simple, but I don't know how to generate such dates. For example, there are two days that have data, 1st and 16th day in each month. How to generate a sequence of dates? I tried the code below but got the error message. Thanks for your help.

> seq(as.Date('2000-01-01'),as.Date('2000-12-31'),by='bi-monthly')
Error in seq.Date(as.Date("2000-01-01"), as.Date("2000-12-31"), by = "bi-monthly") : 
  invalid string for 'by'
all_day_1s <- seq(as.Date('2000-01-01'),as.Date('2000-12-31'),by='month')
all_day_16s <- all_day_1s+15

all_day_1s_and_16s <- c(all_day_1s,all_day_16s)

sorted_ad_1_16 <- sort(all_day_1s_and_16s)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.