check_rs_rscat_rsscat {sdtmchecks} | R Documentation |
Check for patients with populated RSSCAT but missing RSCAT.
Description
Check for patients with populated RSSCAT but missing RSCAT in RS domain to help flag a potential mapping issue for SPA; this does not warrant a query in Rave.
Usage
check_rs_rscat_rsscat(RS)
Arguments
RS |
Response SDTM dataset with variables USUBJID, RSCAT and RSSCAT. |
Value
boolean value if check failed or passed with 'msg' attribute if the test failed
Author(s)
Saibah Chohan, Ashley Mao, Tina Cho (HackR 2021 Team STA-R)
Examples
RS <- data.frame(
USUBJID = c("id1", "id1", "id2", "id2", "id3"),
RSCAT = c("A", "A", "B", NA, NA),
RSSCAT = c("AA", "AA", "BB", "BB","AA"))
check_rs_rscat_rsscat(RS)
# Test with missing RSCAT
RS$RSCAT = NULL
check_rs_rscat_rsscat(RS)
[Package sdtmchecks version 1.0.0 Index]