Learn R Programming

sdtmchecks (version 1.0.0)

check_ex_visit: Check for missing EX.VISIT

Description

This check looks missing EX.VISIT values when EX.EXOCCUR=Y (or EX.EXOCCUR doesn't exist)

Usage

check_ex_visit(EX)

Value

boolean value if check failed or passed with 'msg' attribute if the test failed

Arguments

EX

Exposure SDTM dataset with variables USUBJID,EXTRT,EXSTDTC,VISIT, and optional variable EXOCCUR

Author

Jen Chen

Examples

Run this code

 EX <- data.frame(
 USUBJID = 1:3,
 EXTRT = 1:3,
 EXSTDTC = 1:3,
 EXOCCUR = "Y",
 VISIT = NA
)

check_ex_visit(EX)

EX$EXOCCUR=NULL

check_ex_visit(EX)

EX$VISIT=NULL

check_ex_visit(EX)#

Run the code above in your browser using DataLab