Check for co-existence of two activities
The'and' rule checks whether two activities both occur in a case (or are both absent). If activity A exists, Activity B should also exist, and vice versa.
and(activity_a, activity_b)
activity_a |
Activity A. A character vector of length one. This should be an activity of the event log supplied to 'check_rule'. |
activity_b |
Activity B. A character vector of length one. This should be an activity of the event log supplied to 'check_rule'. |
Other Declarative Rules:
absent()
,
contains_between()
,
contains_exactly()
,
contains()
,
ends()
,
precedence()
,
responded_existence()
,
response()
,
starts()
,
succession()
,
xor()
library(bupaR) library(eventdataR) # Check that if a patients is registered, he's also checked-out, and vice versa. patients %>% check_rule(and("Registration","Check-out"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.