View source: R/date_conversion.R
make_dy | R Documentation |
Calculate an SDTM –DY value from a date and a reference date
make_dy(dates, refdt)
dates |
The dates for calculation |
refdt |
The dates for reference |
dates
and refdt
is passed through
dateany_to_date()
to ensure that they are R Date class objects.
An integer vector with days since the reference date according to
SDTM calculation rules: If dates < refdt
, the difference in days;
if dates >= refdt
, the difference in days plus one.
Other Date management and conversion:
dateany_to_date()
,
generate_dtc()
,
is_ISO8601_calendar_date()
,
is_ISO8601_calendar_datetime()
,
is_ISO8601_ordinal_datetime()
,
is_ISO8601_time()
,
is_ISO8601_timezone()
,
is_ISO8601_week_datetime()
,
pattern_ISO8601_any_date()
,
pattern_ISO8601_any_datetime()
,
pattern_ISO8601_calendar_date()
,
pattern_ISO8601_calendar_datetime()
,
pattern_ISO8601_calendar_year()
,
pattern_ISO8601_ordinal_date()
,
pattern_ISO8601_ordinal_datetime()
,
pattern_ISO8601_time()
,
pattern_ISO8601_timezone()
,
pattern_ISO8601_week_date()
,
pattern_ISO8601_week_datetime()
,
sdtm_dtc_to_datetime()
,
sdtm_first_dose()
,
sdtm_time_actual()
make_dy(c("2022-01-02", "2022-01-03", "2022-01-04"), "2022-01-03")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.