How to round floor_date() to arbitrary date?
问题 I am using floor_date to round dates to the weeks: library(lubridate) floor_date(ymd_hms('2016-08-26 16:27:15'), '7 days') [1] "2016-08-22 UTC" However, I would like to set a specific date as the beginning of the first week. For instance, I would like to set "2016-08-26 UTC" as first week. As a workaround I was trying to tweak getOption("lubridate.week.start") , but I cannot get to change the starting weekday regardless of what I pass: > floor_date(ymd_hms('2016-08-26 16:27:15'), '7 days',