Skip to content
Prev 77411 / 398502 Next

month increment for chron dates

I have a vector of over 7,000 chron dates in the format "mm/dd/yy".  I need
to increment each date in the vector by a standard number of months.
Lapply with seq.dates is working OK; this increments the vector x by 3
months:

dates(unlist(lapply(x, function(g) seq.dates(g, by="months", length=4)[4])))

But this takes about 55 seconds to run on a Windows XP 1.8 Pentium 512 RAM
PC with R version 2.0.0
Can you recommend a more efficient way to do this?

thanks for your advice

Brian Winkler
Controller
BPS Trade Services
CGI