EX <- data.frame(USUBJID = LETTERS[1:5],
VISIT = paste0("Visit ", 1:5),
VISITNUM = 1:5,
EXOCCUR = c('Y', rep('', 4)),
EXTRT = LETTERS[1:5],
EXDOSE = 1:5,
EXSTDTC = c('2010-01-01', rep('', 4)),
EXENDTC = c('2010-01-01', rep('', 4)),
stringsAsFactors = FALSE)
EX$EXOCCUR[2] <- 'Y'
EX$EXSTDTC[2] <- '2011'
EX$EXDOSE[1] <- 0
check_ex_exoccur_exdose_exstdtc(EX)
EX$VISIT <- NULL
check_ex_exoccur_exdose_exstdtc(EX)
Run the code above in your browser using DataLab