precedence: Precedence

View source: R/precedence.R

precedenceR 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"))


processcheckR documentation built on Oct. 3, 2022, 5:05 p.m.