Skip to content

Error with number_of_repetitions() in 0.9.3 #50

Description

@kovla

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(...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions