Trim cases from the first event of a set of start activities to the last event of a set of end activities.

filter_trim(eventlog, start_activities, end_activities, reverse)

# S3 method for eventlog
filter_trim(eventlog, start_activities = NULL,
  end_activities = NULL, reverse = FALSE)

# S3 method for grouped_eventlog
filter_trim(eventlog, start_activities = NULL,
  end_activities = NULL, reverse = FALSE)

ifilter_trim(eventlog)

Arguments

eventlog

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

start_activities

A vector of activity identifiers, or NULL

end_activities

A vector of activity identifiers, or NULL

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

One can trim cases by removing one or more activity instances at the start and/or end of a case. Trimming is performed until all cases have a start and/or end point belonging to a set of allowed activity labels. This filter requires a set of allowed start activities and/or a set of allowed end activities. If one of them is not provided it will not trim the cases at this edge.The selection can be reversed, which means that only the trimmed events at the start and end of cases are retained. As such, this argument allows to cut intermediate parts out of traces.

Methods (by class)

  • eventlog: Filter event log

  • grouped_eventlog: Filter grouped event log

See also