Running 'testthat.R' [6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(psmineR)
  > 
  > test_check("psmineR")
  Saving _problems/test_ps_aggregated-13.R
  Saving _problems/test_ps_aggregated-14.R
  Saving _problems/test_ps_aggregated-160.R
  Saving _problems/test_ps_aggregated-161.R
  Saving _problems/test_ps_aggregated-174.R
  Saving _problems/test_ps_aggregated-176.R
  Saving _problems/test_ps_detailed-13.R
  Saving _problems/test_ps_detailed-18.R
  Saving _problems/test_ps_detailed-141.R
  Saving _problems/test_ps_detailed-146.R
  Saving _problems/test_ps_detailed-160.R
  Saving _problems/test_ps_detailed-166.R
  [ FAIL 12 | WARN 2 | SKIP 8 | PASS 6 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (8): 'test_ps_aggregated.R:70:1', 'test_ps_aggregated.R:90:1',
    'test_ps_aggregated.R:110:1', 'test_ps_aggregated.R:120:1',
    'test_ps_detailed.R:46:1', 'test_ps_detailed.R:71:1',
    'test_ps_detailed.R:91:1', 'test_ps_detailed.R:101:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test_ps_aggregated.R:9:3'): test ps_aggregated on eventlog ────────
  Expected `ps <- patients %>% ps_aggregated()` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(ps <- patients %>% ps_aggregated(), NA) at test_ps_aggregated.R:9:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients %>% ps_aggregated()
    8. ├─psmineR::ps_aggregated(.)
    9. ├─psmineR:::ps_aggregated.log(.)
   10. │ └─psmineR:::get_segments(...)
   11. │   └─... %>% order_segments(log)
   12. ├─psmineR:::order_segments(., log)
   13. │ └─data.table::setorderv(dt, cols = "start_t")
   14. │   └─base::is.data.frame(x)
   15. ├─psmineR:::filter_segments(...)
   16. └─psmineR:::build_classifier(., classification)
   17.   ├─...[]
   18.   └─data.table:::`[.data.table`(...)
  ── Error ('test_ps_aggregated.R:14:3'): test ps_aggregated on eventlog ─────────
  Error in `eval(code, test_env)`: object 'ps' not found
  Backtrace:
      ▆
   1. └─testthat::expect_s3_class(ps, "ggplot") at test_ps_aggregated.R:14:3
   2.   └─testthat::quasi_label(enquo(object))
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test_ps_aggregated.R:156:3'): test ps_aggregated on activitylog ───
  Expected `ps <- patients_act %>% ps_aggregated()` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_ps_aggregated.R:156:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients_act %>% ps_aggregated()
    8. ├─psmineR::ps_aggregated(.)
    9. ├─psmineR:::ps_aggregated.log(.)
   10. │ └─psmineR:::get_segments(...)
   11. │   └─... %>% order_segments(log)
   12. ├─psmineR:::order_segments(., log)
   13. │ └─data.table::setorderv(dt, cols = "start_t")
   14. │   └─base::is.data.frame(x)
   15. ├─psmineR:::filter_segments(...)
   16. └─psmineR:::build_classifier(., classification)
   17.   ├─...[]
   18.   └─data.table:::`[.data.table`(...)
  ── Error ('test_ps_aggregated.R:161:3'): test ps_aggregated on activitylog ─────
  Error in `eval(code, test_env)`: object 'ps' not found
  Backtrace:
      ▆
   1. └─testthat::expect_s3_class(ps, "ggplot") at test_ps_aggregated.R:161:3
   2.   └─testthat::quasi_label(enquo(object))
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test_ps_aggregated.R:169:3'): test ps_aggregated on grouped_activitylog ──
  Expected `ps <- patients_act %>% group_by_resource() %>% ps_aggregated()` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 8/8 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_ps_aggregated.R:169:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients_act %>% group_by_resource() %>% ps_aggregated()
    8. ├─psmineR::ps_aggregated(.)
    9. ├─psmineR:::ps_aggregated.grouped_log(.)
   10. │ └─psmineR:::ps_aggregated.log(...)
   11. │   └─psmineR:::get_segments(...)
   12. │     └─... %>% order_segments(log)
   13. ├─psmineR:::order_segments(., log)
   14. │ └─data.table::setorderv(dt, cols = "start_t")
   15. │   └─base::is.data.frame(x)
   16. ├─psmineR:::filter_segments(...)
   17. ├─psmineR:::build_classifier(., classification)
   18. └─psmineR:::construct_segments(., classification)
   19.   └─psmineR:::construct_segments.activitylog(...)
   20.     ├─...[]
   21.     └─data.table:::`[.data.table`(...)
  ── Error ('test_ps_aggregated.R:176:3'): test ps_aggregated on grouped_activitylog ──
  Error in `eval(code, test_env)`: object 'ps' not found
  Backtrace:
      ▆
   1. └─testthat::expect_s3_class(ps, "ggplot") at test_ps_aggregated.R:176:3
   2.   └─testthat::quasi_label(enquo(object))
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test_ps_detailed.R:9:3'): test ps_detailed on eventlog ────────────
  Expected `ps <- patients %>% ps_detailed()` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(ps <- patients %>% ps_detailed(), NA) at test_ps_detailed.R:9:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients %>% ps_detailed()
    8. ├─psmineR::ps_detailed(.)
    9. ├─psmineR:::ps_detailed.log(.)
   10. │ └─psmineR:::get_segments(...)
   11. │   └─... %>% order_segments(log)
   12. ├─psmineR:::order_segments(., log)
   13. │ └─data.table::setorderv(dt, cols = "start_t")
   14. │   └─base::is.data.frame(x)
   15. ├─psmineR:::filter_segments(...)
   16. └─psmineR:::build_classifier(., classification)
   17.   ├─...[]
   18.   └─data.table:::`[.data.table`(...)
  ── Error ('test_ps_detailed.R:14:3'): test ps_detailed on eventlog ─────────────
  Error in ``[.data.table`(dt, , `:=`((classification), fcase(delta <= quantile(delta, 0.25), 1L, delta <= quantile(delta, 0.5), 2L, delta <= quantile(delta, 0.75), 3L, default = 4L)), by = "segment")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(ps <- patients %>% ps_detailed(), NA) at test_ps_detailed.R:14:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients %>% ps_detailed()
    8. ├─psmineR::ps_detailed(.)
    9. ├─psmineR:::ps_detailed.log(.)
   10. │ └─psmineR:::get_segments(...)
   11. │   └─... %>% order_segments(log)
   12. ├─psmineR:::order_segments(., log)
   13. │ └─data.table::setorderv(dt, cols = "start_t")
   14. │   └─base::is.data.frame(x)
   15. ├─psmineR:::filter_segments(...)
   16. └─psmineR:::build_classifier(., classification)
   17.   ├─...[]
   18.   └─data.table:::`[.data.table`(...)
  ── Failure ('test_ps_detailed.R:137:3'): test ps_detailed on activitylog ───────
  Expected `ps <- patients_act %>% ps_detailed()` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_ps_detailed.R:137:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients_act %>% ps_detailed()
    8. ├─psmineR::ps_detailed(.)
    9. ├─psmineR:::ps_detailed.log(.)
   10. │ └─psmineR:::get_segments(...)
   11. │   └─... %>% order_segments(log)
   12. ├─psmineR:::order_segments(., log)
   13. │ └─data.table::setorderv(dt, cols = "start_t")
   14. │   └─base::is.data.frame(x)
   15. ├─psmineR:::filter_segments(...)
   16. └─psmineR:::build_classifier(., classification)
   17.   ├─...[]
   18.   └─data.table:::`[.data.table`(...)
  ── Error ('test_ps_detailed.R:142:3'): test ps_detailed on activitylog ─────────
  Error in ``[.data.table`(dt, , `:=`((classification), fcase(delta <= quantile(delta, 0.25), 1L, delta <= quantile(delta, 0.5), 2L, delta <= quantile(delta, 0.75), 3L, default = 4L)), by = "segment")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test_ps_detailed.R:142:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients_act %>% ps_detailed()
    8. ├─psmineR::ps_detailed(.)
    9. ├─psmineR:::ps_detailed.log(.)
   10. │ └─psmineR:::get_segments(...)
   11. │   └─... %>% order_segments(log)
   12. ├─psmineR:::order_segments(., log)
   13. │ └─data.table::setorderv(dt, cols = "start_t")
   14. │   └─base::is.data.frame(x)
   15. ├─psmineR:::filter_segments(...)
   16. └─psmineR:::build_classifier(., classification)
   17.   ├─...[]
   18.   └─data.table:::`[.data.table`(...)
  ── Failure ('test_ps_detailed.R:155:3'): test ps_detailed on grouped_activitylog ──
  Expected `ps <- patients_act %>% group_by_resource() %>% ps_detailed()` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 8/8 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_ps_detailed.R:155:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients_act %>% group_by_resource() %>% ps_detailed()
    8. ├─psmineR::ps_detailed(.)
    9. ├─psmineR:::ps_detailed.grouped_log(.)
   10. │ └─psmineR:::ps_detailed.log(...)
   11. │   └─psmineR:::get_segments(...)
   12. │     └─... %>% order_segments(log)
   13. ├─psmineR:::order_segments(., log)
   14. │ └─data.table::setorderv(dt, cols = "start_t")
   15. │   └─base::is.data.frame(x)
   16. ├─psmineR:::filter_segments(...)
   17. ├─psmineR:::build_classifier(., classification)
   18. └─psmineR:::construct_segments(., classification)
   19.   └─psmineR:::construct_segments.activitylog(...)
   20.     ├─...[]
   21.     └─data.table:::`[.data.table`(...)
  ── Error ('test_ps_detailed.R:161:3'): test ps_detailed on grouped_activitylog ──
  Error in ``[.data.table`(dt, , `:=`(start_t = do.call(pmin, c(na.rm = TRUE, .SD)), end_t = do.call(pmax, c(na.rm = TRUE, .SD))), .SDcols = TIMESTAMP_CLASSIFIERS, by = c(case_id(log), activity_id(log), "ACTIVITY_INSTANCE", classification))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test_ps_detailed.R:161:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─patients_act %>% group_by_resource() %>% ps_detailed()
    8. ├─psmineR::ps_detailed(.)
    9. ├─psmineR:::ps_detailed.grouped_log(.)
   10. │ └─psmineR:::ps_detailed.log(...)
   11. │   └─psmineR:::get_segments(...)
   12. │     └─... %>% order_segments(log)
   13. ├─psmineR:::order_segments(., log)
   14. │ └─data.table::setorderv(dt, cols = "start_t")
   15. │   └─base::is.data.frame(x)
   16. ├─psmineR:::filter_segments(...)
   17. ├─psmineR:::build_classifier(., classification)
   18. └─psmineR:::construct_segments(., classification)
   19.   └─psmineR:::construct_segments.activitylog(...)
   20.     ├─...[]
   21.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 12 | WARN 2 | SKIP 8 | PASS 6 ]
  Error:
  ! Test failures.
  Execution halted