Learn R Programming

sdtmchecks (version 1.0.0)

check_ds_dsterm_death_due_to: Check missing cause of death information in DS

Description

This check looks for DS.DSTERM values with missing death reason and returns a data frame (e.g. records where DSTERM = 'DEATH DUE TO')

Usage

check_ds_dsterm_death_due_to(DS)

Value

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

Arguments

DS

Disposition SDTMv dataset with variables USUBJID, DSTERM, DSDECOD, DSDTC, DSSTDTC

Author

Sara Bodach

Examples

Run this code

DS <- data.frame(
 STUDYID = 1,
 USUBJID = 1:4,
 DSTERM = c("DEATH DUE TO",
   "DEATH DUE TO ",
   "DEATH DUE TO ADVERSE EVENT",
   "DEATH DUE TO UNKNOWN"),
 DSDECOD = "DEATH",
 DSDTC = "2017-01-01",
 DSSTDTC = "2017-01-01",
 stringsAsFactors=FALSE
)

check_ds_dsterm_death_due_to(DS)

DS$DSDECOD <- NULL
check_ds_dsterm_death_due_to(DS)

Run the code above in your browser using DataLab