Currently on step 3 it has this line
derive_vars_merged(
dataset_add = ex_dtm,
by_vars = exprs(STUDYID, USUBJID),
new_vars = exprs(TRTEDTM = EXENDTM, TRTETMF = EXENTMF),
order = exprs(EXENDTM),
mode = "last",
filter_add = (EXDOSE > 0 | EXTRT == "PLACEBO") & !is.na(EXENDTM)
) |>
mutate(
TRTSDT = as.Date(TRTSDTM),
TRTEDT = as.Date(TRTEDTM)
)
Later on, it talks about not using as.Date. While this is in the context of DTC, it might be more consistent to use derive_vars_dtm_to_dt here
Currently on step 3 it has this line
Later on, it talks about not using as.Date. While this is in the context of DTC, it might be more consistent to use
derive_vars_dtm_to_dthere