This check looks for target lesions with missing TULOC values and returns a data frame. Only applies to assessments by investigator.
check_tu_tuloc_missing(TU, preproc = identity, ...)
boolean value if check failed or passed with 'msg' attribute if the test failed
TU <- data.frame(
USUBJID = 1:10,
TUDTC = 1:10,
VISIT = "C1D1",
TUORRES = "TARGET",
TULOC = "LIVER",
TUSPID = "FORMNAME-R:19/L:19XXXX",
stringsAsFactors=FALSE
)
check_tu_tuloc_missing(TU)
#> [1] TRUE
TU$TULOC[1] = "NA"
TU$TULOC[2] = ""
TU$TULOC[3] = NA
check_tu_tuloc_missing(TU,preproc=roche_derive_rave_row)
#> [1] FALSE
#> attr(,"msg")
#> [1] "There are 3 target lesions with missing TULOC. "
#> attr(,"data")
#> USUBJID TUDTC VISIT TUORRES TULOC RAVE
#> 1 1 1 C1D1 TARGET NA FORMNAME-R:19
#> 2 2 2 C1D1 TARGET FORMNAME-R:19
#> 3 3 3 C1D1 TARGET <NA> FORMNAME-R:19
TU$TUSPID <- NULL
check_tu_tuloc_missing(TU)
#> [1] FALSE
#> attr(,"msg")
#> [1] "There are 3 target lesions with missing TULOC. "
#> attr(,"data")
#> USUBJID TUDTC VISIT TUORRES TULOC
#> 1 1 1 C1D1 TARGET NA
#> 2 2 2 C1D1 TARGET
#> 3 3 3 C1D1 TARGET <NA>