calc_DY | R Documentation |
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.
calc_DY(tbl, DY_col, DTC_col, RFSTDTC = "RFSTDTC")
tbl |
a data frame with the date column |
DY_col |
string, the name of the new DY column to create |
DTC_col |
string, the column in |
RFSTDTC |
a string, the column to use for |
a modified copy of tbl
with the new DY column
create_BLFL()
, create_EPOCH()
df <- data.frame(
DTC = c("2023-08-01", "2023-08-02", "2023-08-03", "2023-08-04"),
RFSTDTC = rep("2023-08-02", 4)
)
calc_DY(df, DY_col = "XXDY", DTC_col = "DTC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.