This check looks for DM entries where ARM is not equal to ACTARM
check_dm_actarm_arm(DM)Boolean value for whether the check passed or failed, with 'msg' attribute if the check failed
DM <- data.frame(USUBJID = 1:5,
                 ARM = c(letters[1:3], letters[5:6]),
                 ACTARM = letters[1:5],
                 stringsAsFactors = FALSE)
check_dm_actarm_arm(DM)
#> [1] FALSE
#> attr(,"msg")
#> [1] "DM has entries where ARM != ACTARM. "
#> attr(,"data")
#>   USUBJID ARM ACTARM
#> 1       4   e      d
#> 2       5   f      e