Convenience functions to round or truncate to a multiple of seconds.
round_hms(x, secs)trunc_hms(x, secs)
trunc_hms(x, secs)
A vector of class hms
Multiple of seconds, a positive numeric. Values less than one are supported
The input, rounded or truncated to the nearest multiple of secs
secs
# NOT RUN { round_hms(as.hms("12:34:56"), 5) round_hms(as.hms("12:34:56"), 60) trunc_hms(as.hms("12:34:56"), 60) # }
Run the code above in your browser using DataLab