Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

contains

Check if activity is present (contained) in a case


Description

This rules examines whether the supplied activity is present in a case or not. The argument 'n' can be used to set a minimum number of occurences that should be present in each case. Using the function 'check_rule', this information can be added to the event log.

Usage

contains(activity, n = 1)

Arguments

activity

Activity to check. A character vector of length one. Should be an activity of the eventlog supplied with check_rule.

n

The minimum number of times the activity should be present.

See Also

Other Declarative Rules: absent(), and(), contains_between(), contains_exactly(), ends(), precedence(), responded_existence(), response(), starts(), succession(), xor()

Examples

library(bupaR)
library(eventdataR)

# Each patient should be registered at least once.
patients %>%
check_rule(contains("Registration"))

# Check whether some patients have received 2 or more blood tests.

patients %>%
check_rule(contains("Blood test", n = 2))

processcheckR

Rule-Based Conformance Checking of Business Process Event Data

v0.1.3
MIT + file LICENSE
Authors
Gert Janssenswillen [aut, cre]
Initial release
2020-06-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.