如何将日期栏中的日期四舍五入到下一个工作日?所以每个周六、周日和节假日都应该转换为下一个工作日。此外,我们如何将其他列的输出也包括在转换到下一个工作日的过程中?
我用 bizdays 函数试过这个:
TestDates <- RawTweetDataWSentiment
View(TestDates)
bizdays.options$set(default.calendar="UnitedKingdom/ANBIMA")
cal <- create.calendar("UnitedKingdom/ANBIMA", holidays=holidaysANBIMA, weekdays=c("saturday", "sunday"))
adjust.next(TestDates$Date, cal)
TestDates1 <- adjust.next(TestDates$Date, cal)
View(TestDates1)
但是,这仅返回日期列
有谁知道如何在 R 中做到这一点?