process_time | R Documentation |
Ceiling, Floor and Other operations on a POSIXct object
process_time(x, second_precision = 3600, method = ceiling, ...)
x |
a POSIXct vector |
second_precision |
the precision in seconds on which the processing operates on |
method |
the method for processing |
... |
not used |
POSIXct object
Alexios Galanos
# end of hour
process_time(as.POSIXct('2022-08-03 03:00:01', tz = 'UTC'), 3600, method = ceiling)
# start of hour
process_time(as.POSIXct('2022-08-03 03:00:01', tz = 'UTC'), 3600, method = floor)
# end of minute
process_time(as.POSIXct('2022-08-03 03:00:01', tz = 'UTC'), 60, method = ceiling)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.