Filters cases based on the presence (or absence) of activities

filter_activity_presence(eventlog, activities, method, reverse)

# S3 method for eventlog
filter_activity_presence(eventlog, activities = NULL,
  method = c("all", "one_of", "none"), reverse = FALSE)

# S3 method for grouped_eventlog
filter_activity_presence(eventlog,
  activities = NULL, method = c("all", "one_of", "none"), reverse = FALSE)

ifilter_activity_presence(eventlog)

Arguments

eventlog

The dataset to be used. Should be a (grouped) eventlog object.

activities

Character vector containing one or more activity identifiers.

method

Filter method. If "all", each of the activities should be present. If "one_of", at least one of them should be present. If "none", none of the activities are allowed to occur in the filtered traces.

reverse

Logical, indicating whether the selection should be reversed.

Value

When given an eventlog, it will return a filtered eventlog. When given a grouped eventlog, the filter will be applied in a stratified way (i.e. each separately for each group). The returned eventlog will be grouped on the same variables as the original event log.

Details

This functions allows to filter cases that contain certain activities. It requires as input a vector containing one or more activity labels and it has a method argument. The latter can have the values all, none or one_of.

  • When set to `all`, it means that all the specified activity labels must be present for a case to be selected

  • `none` means that they are not allowed to be present.

  • `one_of` means that at least one of them must be present.

When only one activity label is supplied, note that methods all and one_of will be identical.

Methods (by class)

  • eventlog: Filter event log on presence of activities.

  • grouped_eventlog: Filter grouped event log on presence of activities.

See also