AE <- data.frame(
STUDYID = rep(1, 3),
USUBJID = 1:3,
AEDTHDTC = c("2020-01-01","2020-01-02","2020-01-03"),
AESPID = "FORMNAME-R:19/L:19XXXX"
)
DS <- data.frame(
STUDYID = rep(1, 3),
USUBJID = 1:3,
DSDECOD = rep("DEATH", 3),
DSSTDTC = c("2020-01-01","2020-01-02","2020-01-03"),
DSSPID = "XXX-R:0",
stringsAsFactors = FALSE
)
# no case
check_dd_ae_aedthdtc_ds_dsstdtc(AE, DS)
# 1 case
DS[3, "DSSTDTC"] <- "2000-01-01"
check_dd_ae_aedthdtc_ds_dsstdtc(AE, DS, preproc=roche_derive_rave_row)
# check for non existence of vars
DS$DSDECOD <- NULL
DS$DSSTDTC <- NULL
check_dd_ae_aedthdtc_ds_dsstdtc(AE, DS)
Run the code above in your browser using DataLab