Closed fmannhardt closed 6 years ago
When supplying an event log with a (possibly) unrelated column names 'time' process_map fails with an error:
> process_map(log) Error in summarise_impl(.data, dots) : Column `time` must have a unique name > traceback() 13: stop(list(message = "Column `time` must have a unique name", call = summarise_impl(.data, dots), cppstack = list(file = "", line = -1L, stack = "C++ stack not available on this system"))) 12: summarise_impl(.data, dots) 11: summarise.tbl_df(., start_time = min(time), end_time = max(time), min_order = min(.order)) 10: summarize(., start_time = min(time), end_time = max(time), min_order = min(.order)) 9: function_list[[k]](value) 8: withVisible(function_list[[k]](value)) 7: freduce(value, `_function_list`) 6: `_fseq`(`_lhs`) 5: eval(quote(`_fseq`(`_lhs`)), env, env) 4: eval(quote(`_fseq`(`_lhs`)), env, env) 3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env)) 2: grouped_log %>% summarize(start_time = min(time), end_time = max(time), min_order = min(.order)) at process_map.R#91 1: process_map(log)
Code to reproduce:
x <- data.frame(case = c(1), time = c("foobar"), timestamp = c(as.POSIXct(Sys.time())), activity = c("test"), activity_instance_id = c(1), resource = c("bar"), lifecyle = "complete") log <- eventlog(x, case_id = "case", timestamp = "timestamp", activity_id = "activity", activity_instance_id = "activity_instance_id", resource_id = "resource", lifecycle_id = "lifecyle") process_map(log)
Session info:
> sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=Norwegian Bokmål_Norway.1252 LC_CTYPE=Norwegian Bokmål_Norway.1252 LC_MONETARY=Norwegian Bokmål_Norway.1252 LC_NUMERIC=C [5] LC_TIME=Norwegian Bokmål_Norway.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] bindrcpp_0.2.2 petrinetR_0.2.0 processmonitR_0.1.0 xesreadR_0.2.2 processmapR_0.3.2.9000 eventdataR_0.2.0 edeaR_0.8.1 [8] bupaR_0.4.1 forcats_0.3.0 stringr_1.3.1 dplyr_0.7.6 purrr_0.2.5 readr_1.1.1 tidyr_0.8.1 [15] tibble_1.4.2 ggplot2_3.0.0 tidyverse_1.2.1 loaded via a namespace (and not attached): [1] Rcpp_0.12.18 lubridate_1.7.4 lattice_0.20-35 visNetwork_2.0.4 utf8_1.1.4 assertthat_0.2.0 digest_0.6.16 mime_0.5 [9] R6_2.2.2 cellranger_1.1.0 plyr_1.8.4 backports_1.1.2 httr_1.3.1 pillar_1.3.0 rlang_0.2.2 lazyeval_0.2.1 [17] readxl_1.1.0 shinyTime_0.2.1 rstudioapi_0.7 data.table_1.11.4 miniUI_0.1.1.1 DiagrammeR_1.0.0 downloader_0.4 htmlwidgets_1.2 [25] igraph_1.2.2 munsell_0.5.0 shiny_1.1.0 broom_0.5.0 compiler_3.5.1 influenceR_0.1.0 rgexf_0.15.3 httpuv_1.4.5 [33] modelr_0.1.2 pkgconfig_2.0.2 htmltools_0.3.6 tidyselect_0.2.4 gridExtra_2.3 XML_3.98-1.16 fansi_0.3.0 viridisLite_0.3.0 [41] crayon_1.3.4 withr_2.1.2 later_0.7.3 grid_3.5.1 nlme_3.1-137 jsonlite_1.5 xtable_1.8-2 gtable_0.2.0 [49] magrittr_1.5 scales_1.0.0 cli_1.0.0 stringi_1.2.4 viridis_0.5.1 promises_1.0.1 ggthemes_4.0.1 xml2_1.2.0 [57] brew_1.0-6 RColorBrewer_1.1-2 tools_3.5.1 glue_1.3.0 hms_0.4.2 Rook_1.1-1 yaml_2.2.0 colorspace_1.3-2 [65] rvest_0.3.2 plotly_4.8.0 bindr_0.1.1 haven_1.1.2
Thx. I'll fix later this week
Problem should be solved now.
When supplying an event log with a (possibly) unrelated column names 'time' process_map fails with an error:
Code to reproduce:
Session info: