check_ex_dup | R Documentation |
This check looks for duplicate treatment records in EX
check_ex_dup(EX)
EX |
Exposure SDTM dataset with variables USUBJID, EXTRT, EXDOSE, EXSTDTC, EXSTDTC. VISIT is optional. |
boolean value if check failed or passed with 'msg' attribute if the test failed
Fang Yuan
EX <- data.frame(
USUBJID = rep(1,2),
EXTRT = rep(1,2),
EXDOSE = rep(1,2),
EXSTDTC = rep(1,2),
EXOCCUR = "Y"
)
check_ex_dup(EX)
EX$EXOCCUR <- NULL
check_ex_dup(EX)
EX$EXDOSE <- NULL
check_ex_dup(EX)
# test with sample data without duplicates
EX <- data.frame(
USUBJID = 1:2,
EXTRT = 1:2,
EXDOSE = 1:2,
EXSTDTC = 1:2,
EXOCCUR = "Y"
)
check_ex_dup(EX)
EX = rbind(EX,EX)
check_ex_dup(EX)
# check non existing vars
EX$EXTRT <- NULL
EX$EXOCCUR <- NULL
check_ex_dup(EX)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.