Convert time periods to internal time format
emr_time(days = 0, months = 0, years = 0, hours = 0)
hours(n)
hour()
days(n)
day()
weeks(n)
week()
day()
months(n)
month()
years(n)
year()
number of days
number of months
number of years
number of hours
number of days/weeks/months/years/hours
Machine time format (number of hours)
emr_time
converts a generic number of years, months day and hours to the internal
naryn machine format (which is hours).
year
, years
, month
, months
, week
, weeks
,
day
, days
, hour
, hours
are other convenience functions to get a time period explicitly.
emr_time(5) # 5 days
#> [1] 120
emr_time(months = 4) # 4 months
#> [1] 2880
emr_time(2, 4, 1) # 1 year, 4 months and 2 days
#> [1] 11688
year() # 1 year
#> [1] 8760
years(5) # 5 years
#> [1] 43800
month() # 1 month
#> [1] 720
months(5) # 5 months
#> [1] 3600
day() # 1 day
#> [1] 24
days(9) # 9 days
#> [1] 216
week() # 1 week
#> [1] 168
weeks(2) # 2 weeks
#> [1] 336
hour() # 1 hour
#> [1] 1
hours(5) # 5 hours
#> [1] 5