I have to work with dates in R, and one of the most useful packages that I found for date data is lubridate
. For your problem, you can simply do the following:
require(lubridate)
# ymd function parses dates in year-month-day format
startDate <- ymd('2013-01-31')
# The %m+% adds months to dates without exceeding the last day
myDates <- startDate %m+% months(c(0:6))
lubridate
also has many other functions for dates, and I highly recommend taking a look.