emr_date2time {naryn} | R Documentation |
Converts date and hour to internal time format
Description
Converts date and hour to internal time format.
Usage
emr_date2time(day, month, year, hour = 0)
Arguments
day |
vector of days of month in [1, 31] range |
month |
vector of months in [1, 12] range |
year |
vector of years |
hour |
vector of hours in [0, 23] range |
Details
This function converts date and hour to internal time format. Note: the earliest valid time is 1 March 1867.
Note: if one of the arguments ('day', ...) is a vector, then the other arguments must be vectors two of identical size or scalars. Internally a data frame is built out of all the vectors or scalars before the conversion is applied. Hence rules for data frame creation apply to this function.
Value
Vector of converted times.
See Also
emr_time2hour
, emr_time2dayofmonth
,
emr_time2month
, emr_time2year
Examples
emr_db.init_examples()
# 30 January, 1938, 6:00 - birthday of Islam Karimov
t <- emr_date2time(30, 1, 1938, 6)
emr_time2hour(t)
emr_time2dayofmonth(t)
emr_time2month(t)
emr_time2year(t)
# cover all times when Islam Karimov could have been born
# (if we don't know the exact hour!)
t <- emr_date2time(30, 1, 1938, 0:23)
[Package naryn version 2.6.26 Index]