Does anybody have a neater way of rounding lubridate period and duration objects to minutes instead of seconds.
For example, I have the following pipe of code:
seconds(x = 3600115) %>% as.duration() %>% as.period()
This results in: 41d 16H 1M 55S. I would like to round it so it becomes: 41d 16H 2M 0S.
Is anybody aware of a better way than:
(seconds(x = 3600115) / 60) %>% as.numeric() %>% round() %>% dminutes() %>% as.period()
This results in: 41d 16H 2M 0S