add 1 business day to date in R
I have a Date object in R and would like to add 1 business day to this date. If the result is a holiday, I would like the date to be incremented to the next non-holiday date. Let's assume I mean NYSE holidays. How can I do this? Example: mydate = as.Date("2013-12-24") mydate + 1 #this is a holiday so I want this to roll over to the 26th instead I might use a combo of timeDate::nextBizDay() and roll=-Inf to set up a data.table lookup calendar, like this: library(data.table) library(timeDate) ## Set up a calendar for 2013 & 2014 cal <- data.table(date=seq(from=as.Date("2013-01-01"), by=1, length