RoundMinutes: Round a POSIXct time to the nearest mth minute.

Description Usage Arguments Value Examples

Description

Round a POSIXct time to the nearest mth minute.

Usage

1
RoundMinutes(POSIXct, nearest = 5)

Arguments

POSIXct,

POSIXct class vector.

nearest,

Numeric, the time resolution to which the passed times are rounded. Must evenly divide 60.

Value

A vector of POSIXct class corresponding to the input, rounded to the nearest nearest minutes.

Examples

1
2
print(time <- Sys.time()+lubridate::minutes(1:10))
RoundMinutes(time, nearest=5)

mccreigh/rwrfhydro documentation built on Feb. 28, 2021, 1:53 p.m.