As base::difftime() vectors are used throughout ricu, a set of wrapper functions are exported for convenience of instantiation base::difftime() vectors with given time units.

secs(...)

mins(...)

hours(...)

days(...)

weeks(...)

Arguments

...

Numeric vector to coerce to base::difftime()

Value

Vector valued time differences as difftime object.

Examples

hours(1L)
#> Time difference of 1 hours
mins(NA_real_)
#> Time difference of NA mins
secs(1:10)
#> Time differences in secs
#>  [1]  1  2  3  4  5  6  7  8  9 10
hours(numeric(0L))
#> Time difference of  hours