bupaverse / bupaR

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

Error in UseMethod("process_map") when #39

Closed Geode07 closed 2 years ago

Geode07 commented 2 years ago

Hello,

New to BupaR from PM4Py, I'm trying to create an event log from csv/xlsx file so I can run it through processanimateR. This event log has ~70K rows and has only an end timestamp.

After importing an excel workbook as follows: export_log8 <- read_excel("export_log8.xlsx"),

I tried both ways to create the event log object, using this export_log8 variable:

  1. the event log function export_log8a eventlog( case_id = "INR", activity_id = "Activity", activity_instance_id = "id", lifecycle_id = "Combined_Status", timestamp = "Start_x", resource_id = "Technology" )

When I run this, I get the following error: Error in UseMethod("eventlog") : no applicable method for 'eventlog' applied to an object of class "character"

  1. the ieventlog interface When I run either processmappR or processanimateR after this step, I get this error:

"Error in UseMethod("process_map") : no applicable method for 'process_map' applied to an object of class "c('tbl_df', 'tbl', 'data.frame')"

I'm on R v4.12 and I've tried using CRAN packages and the githubinstall approach as described in a different issue, but get same error.

I notice that running class(export_log8) outputs [1] "tbl_df" "tbl" "data.frame" as opposed to event log object, so I'm wondering if I'm missing some step in either event log creation approach 1 or 2, such that the event log object is not generated. Or should I downgrade my R version?

Thanks, Gerry

Geode07 commented 2 years ago

I figured out that creating 2 separate variables, 1 for the excel import and then 1 for the event log creation did the trick, as well as adding in "%>%" part for the event log object creation. event_log_life <- event_log_df %>%

Looking forward to exploring the bupaverse visualizations further!