bupaverse / bupaR

Core R package for business process analysis
http://www.bupar.net
Other
56 stars 6 forks source link

how to filter eventlog to external column #14

Closed Sedat1982 closed 3 years ago

Sedat1982 commented 4 years ago

Hello, i can make an eventlog according to a table with Case_iD Activity, Resource, starttimestamp, and endtimestamp columns. As in the below code. And for example i can filter according to the case_id as "filter_case(cases = "your_case_id")". But can i make an eventlog if i want to add another column( for example a "City" column for Case Ids, to the table. if i want to filter eventlog according to the "Cities" of case_id s? If i want to make a filter according to "Cıty" of case_ids, should i add it into event log? and how can i filter it? For example, how can i filter a processmap from "Berlin".

City Case_iD Activity Resource starttimestamp endtimestamp
Berlin          
Berlin          
Munich          
Munich          

eventlog1<- bupaR::activities_to_eventlog( log1, case_id = 'Case_iD', activity_id = 'Activity', resource_id = 'Resource', timestamps = c('starttimestamp', 'endtimestamp') )

gertjanssenswillen commented 4 years ago

Hi

You can use the function filter() or filter_attributes() to filter on any variable in the dataset.

E.G. filter(City == "Berlin").

You do not need to mention it explicitely in the eventlog() function