Convenience functions to round or truncate to a multiple of seconds.
round_hms(x, secs = NULL, digits = NULL) trunc_hms(x, secs = NULL, digits = NULL)
x | A vector of class hms |
---|---|
secs | Multiple of seconds, a positive numeric. Values less than one are supported |
digits | Number of digits, a whole number. Negative numbers are supported. |
The input, rounded or truncated to the nearest multiple of secs
(or number of digits
)
#> 12:34:55#> 12:35:00#> 12:34:56.75#> 12:34:56.8#> 12:35:00#> 12:34:00