filter_rules | R Documentation |
This function can be used to filter event data using declaritive rules or constraint templates.
It needs a log
(object of class log
or derivatives, e.g. grouped_log
,
eventlog
, activitylog
, etc.). and a set of rules
.
Rules can be made with the following templates:
Cardinality:
absent
: Check if the specified activity is absent from a case,
contains
: Check if the specified activity is present (contained) in a case,
contains_between
: Check if the specified activity is present (contained) in a case between the minimum and maximum number of times,
contains_exactly
: Check if the specified activity is present (contained) in a case for exactly n
times.
Relation:
ends
: Check if cases end with the specified activity,
starts
: Check if cases start with the specified activity.
precedence
: Check for precedence between two activities,
response
: Check for response between two activities,
responded_existence
: Check for responded existence between two activities,
succession
: Check for succession between two activities.
Exclusiveness:
and
: Check for co-existence of two activities,
xor
: Check for exclusiveness of two activities.
filter_rules(log, ..., eventlog = deprecated()) ## S3 method for class 'log' filter_rules(log, ..., eventlog = deprecated())
log |
|
... |
Name-rule pairs created by rule functions. |
eventlog |
The rules or constraint templates in this package are (partially) based on DecSerFlow (Declarative Service Flow Language). For more information, see the References below.
When applied to a grouped_log
, the grouping variables are ignored but retained in the returned log.
A filtered log (of same type as input) that satisfied the specified rules.
filter_rules(log)
: Filter a log
using declaritive rules.
van der Aalst, W. M. P., & Pesic, M. (2006). DecSerFlow: Towards a Truly Declarative Service Flow Language. In M. Bravetti, M. Núñez, & G. Zavattaro (Eds.), Proceedings of the 3rd International Workshop on Web Services and Formal Methods (Vol. 4184, pp. 1–23). Springer. doi: 10.1007/11841197_1
check_rules
library(bupaR) library(eventdataR) # Filter where Blood test precedes MRI SCAN and Registration is the start of the case. patients %>% filter_rules(precedence("Blood test","MRI SCAN"), starts("Registration"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.