Learn R Programming

sdtmchecks (version 1.0.0)

check_ds_dsscat: Check for patients with more than one study discontinuation records

Description

This check looks for patient who has more than one study discontinuation records

Usage

check_ds_dsscat(DS)

Value

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

Arguments

DS

Disposition SDTM dataset with variables USUBJID,DSSCAT

Author

Madeleine Ma

Examples

Run this code

DS <- data.frame(
 USUBJID = c(rep(1,3),rep(2,3),rep(3,3)),
 DSSCAT= rep(c("STUDY DISCONTINUATION", "ADVERSE EVENT", "PROTOCOL"),3),
 stringsAsFactors=FALSE
)
check_ds_dsscat(DS)

DS$DSSCAT[8] = "STUDY DISCONTINUATION"
check_ds_dsscat(DS)

DS$DSSCAT = NULL
check_ds_dsscat(DS)


Run the code above in your browser using DataLab