I don't have the time to make a repex but want to post this so I don't forget.
Debugged down the issue with the function to be a column named label.
I think it goes wrong here (which is actually in base bupaR):
add_start_activity <- function(log, label = "Start") {
log %>%
group_by_case() %>%
arrange(.data[[timestamp(log)]]) %>%
slice_events(1) %>%
ungroup_eventlog() %>%
mutate(!!timestamp(log) := .data[[timestamp(log)]] - 1,
!!activity_id(log) := factor(label, levels = c(as.character(bupaR::activity_labels(log)), label)),
!!activity_instance_id(log) := stri_c(.data[[case_id(log)]], "start", sep = "-")) -> start_states
return(add_start_end_activity_bind_logs(log, start_states, label))
}
It seems dplyr somehow evaluates some of the label variables to the column and not the parameter.
The other issue is the stri_c command to define the activity instance clashes if the instance is an int column.
Probably this should be moved to bupaR but this is how I got to the error.