Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with number_of_repetitions() in 0.9.3 #50

Open
kovla opened this issue May 16, 2023 · 1 comment
Open

Error with number_of_repetitions() in 0.9.3 #50

kovla opened this issue May 16, 2023 · 1 comment

Comments

@kovla
Copy link

kovla commented May 16, 2023

After an upgrade to bupaR 0.5.3 and edeaR 0.9.3, there is an error that did not occur with 0.5.2 and 0.9.2 respectively:

> patients %>% group_by_case() %>% number_of_repetitions()
Error in `mutate()`:
ℹ In argument: `data = map(data, fun, ...)`.
Caused by error in `map()`:
ℹ In index: 1.
Caused by error in `!case_id_(eventlog)`:
! invalid argument type
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/dplyr:::mutate_error>
Error in `mutate()`:
ℹ In argument: `data = map(data, fun, ...)`.
Caused by error in `map()`:
ℹ In index: 1.
Caused by error in `!case_id_(eventlog)`:
! invalid argument type
---
Backtrace:
    ▆
 1. ├─patients %>% group_by_case() %>% number_of_repetitions()
 2. ├─edeaR::number_of_repetitions(.)
 3. ├─edeaR:::number_of_repetitions.grouped_eventlog(.)
 4. │ └─bupaR:::apply_grouped_fun(...)
 5. │   └─... %>% mutate(raw = map(data, attr, "raw"))
 6. ├─dplyr::mutate(., raw = map(data, attr, "raw"))
 7. ├─dplyr::mutate(., data = map(data, fun, ...))
 8. ├─dplyr:::mutate.data.frame(., data = map(data, fun, ...))
 9. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
10. │   ├─base::withCallingHandlers(...)
11. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
12. │     └─mask$eval_all_mutate(quo)
13. │       └─dplyr (local) eval()
14. ├─purrr::map(data, fun, ...)
15. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
16. │   ├─purrr:::with_indexed_errors(...)
17. │   │ └─base::withCallingHandlers(...)
18. │   ├─purrr:::call_with_cleanup(...)
19. │   └─edeaR (local) .f(.x[[i]], ...)
20. │     └─eventlog %>% all_repetitions_case
21. ├─edeaR:::all_repetitions_case(.)
22. │ └─... %>% ...
23. ├─dplyr::mutate(...)
24. ├─base::merge(., cases, all.y = T)
25. ├─dplyr::select(., -trace_length)
26. ├─dplyr::mutate(., relative = absolute/trace_length)
27. ├─dplyr::summarize(., absolute = n(), trace_length = first(trace_length))
28. ├─dplyr::group_by(., !!case_id_(eventlog))
29. ├─edeaR:::all_repetitions(.)
30. │ └─... %>% as.data.frame()
31. ├─base::as.data.frame(.)
32. ├─data.table::as.data.table(.)
33. ├─dplyr::rename(...)
34. ├─edeaR:::rework_base(.)
35. │ └─... %>% as.data.frame
36. ├─base::as.data.frame(.)
37. ├─data.table::as.data.table(.)
38. ├─dplyr::rename(...)
39. └─bupaR:::rename.log(...)
@kovla
Copy link
Author

kovla commented May 16, 2023

NB: downgrading to bupaR 0.5.2 is a work-around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant