Utilizes the DY method from the SDTM spec: --DTC-RFSTDTC+1 if --DTC is on
or after RFSTDTC. --DTC-RFSTDTC if --DTC precedes RFSTDTC. This
function can also be used for the ENDY method from the spec which has the
same logic.
a data frame with the date column RFSTDTC and the column
specified by the DTC_col argument
DY_col
string, the name of the new DY column to create
DTC_col
string, the column in tbl which has the dates for which to
calculated the DY value; should either already have a date class or be a
character vector in the format YYYY-MM-DD
RFSTDTC
a string, the column to use for RFSTDTC, default is
"RFSTDTC"; should either already have a date class or be a
character vector in the format YYYY-MM-DD