precedence {processcheckR}R Documentation

Precedence

Description

Check for precedence between two activities.

If activity_b occured, it should be preceded by activity_a in the same case, i.e., if B was executed, it could not have been executed before A was executed. For example, the trace ⁠[A,C,B,B,A]⁠ satisfies the precedence relation.

Usage

precedence(activity_a, activity_b)

Arguments

activity_a

character: Activity A. This should be an activity of the log supplied to check_rule.

activity_b

character: Activity B. This should be an activity of the log supplied to check_rule.

See Also

Other Ordering rules: ends(), responded_existence(), response(), starts(), succession()

Examples

library(bupaR)
library(eventdataR)

# A MRI Scan should be preceeded by a Blood test.

patients %>%
 check_rule(precedence("Blood test","MRI SCAN"))


[Package processcheckR version 0.1.4 Index]