Learn R Programming

sdtmchecks (version 1.0.0)

check_cm_missing_month: Check for conmed dates with year and day known but month unknown

Description

Check for missing month when conmed start (CMSTDTC) or end dates (CMENDTC) have known year and day

Usage

check_cm_missing_month(CM, preproc = identity, ...)

Value

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

Arguments

CM

Concomitant Medications SDTM dataset with variables USUBJID, CMTRT, CMSTDTC, CMENDTC

preproc

An optional company specific preprocessing script

...

Other arguments passed to methods

Author

Chandra Mannem

Examples

Run this code

CM <- data.frame(
 USUBJID = 1:3,
 CMTRT = c("CM1","CM2","CM3"),
 CMSTDTC = c("2017-01-01","2017---01","2017-01-02"),
 CMENDTC = c("2017-02-01","2017-03-01","2017---01"),
 CMSPID = "/F:XXX-D:12345-R:123",
 stringsAsFactors=FALSE
)

check_cm_missing_month(CM)
check_cm_missing_month(CM,preproc=roche_derive_rave_row)

CM$CMSTDTC = NULL

check_cm_missing_month(CM)

Run the code above in your browser using DataLab