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)
Run the code above in your browser using DataLab