Learn R Programming

tsaux (version 1.0.0)

process_time: POSIXct Processing

Description

Ceiling, Floor and Other operations on a POSIXct object

Usage

process_time(x, second_precision = 3600, method = ceiling, ...)

Value

POSIXct object

Arguments

x

a POSIXct vector

second_precision

the precision in seconds on which the processing operates on

method

the method for processing

...

not used

Author

Alexios Galanos

Examples

Run this code
# 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)

Run the code above in your browser using DataLab