I'm trying to round a lubridate Period object to the nearest minute.
library(lubridate)
round_date(as.period("2d 20H 22M 9.57S"))
Gives
Error in as.POSIXct.numeric(x) : 'origin' must be supplied
So round_date is converting my period to a POSIXct, but why? Is it possible to round periods in lubridate without converting them to another format? Seems like I'm missing something simple.
Thanks!