Description Usage Arguments Value Examples
Round a POSIXct time to the nearest mth minute.
1 | RoundMinutes(POSIXct, nearest = 5)
|
POSIXct, |
POSIXct class vector. |
nearest, |
Numeric, the time resolution to which the passed times are rounded. Must evenly divide 60. |
A vector of POSIXct class corresponding to the input, rounded to the
nearest nearest
minutes.
1 2 | print(time <- Sys.time()+lubridate::minutes(1:10))
RoundMinutes(time, nearest=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.