time_helpers: Time helper functions

Description Usage Arguments Value Examples

Description

Time helper functions

Usage

1
2
3
4
5
6
7
8
9
time_to_min(x)

min_to_hr_min(x)

min_to_time(x, day = NULL, tz = "UTC")

floor_1day(x)

yyyymmdd(x)

Arguments

x

an object of class Date or numeric time. Note, only seconds are kept, not milliseconds

day

A date given in YMD format

tz

timezone passed to lubridate functions

Value

A Date or numeric object

Examples

1
2
3
4
5
6
7
tm = Sys.time()
print(tm)
mins = time_to_min(tm)
mins
min_to_time(mins)
min_to_time(mins, day = "2017-01-24")
min_to_hr_min(600)

muschellij2/biobankr documentation built on April 13, 2020, 7:33 a.m.