Running ‘spelling.R’
  Running ‘testthat.R’ [68s/98s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(mccount)
  Loading required package: ggplot2
  > 
  > test_check("mccount")
  Saving _problems/test-calculation_helpers-25.R
  Saving _problems/test-mcc-31.R
  Saving _problems/test-mcc-79.R
  Saving _problems/test-mcc-188.R
  Saving _problems/test-mcc-360.R
  Saving _problems/test-mcc-471.R
  Saving _problems/test-mcc-492.R
  Saving _problems/test-mcc-646.R
  Saving _problems/test-mcc-758.R
  Saving _problems/test-mcc-790.R
  Saving _problems/test-mcc-793.R
  i Converting numeric grouping variable "by_var" to <factor>
  i Found 2 unique groups: 10 and 20
  Saving _problems/test-mcc-1021.R
  Saving _problems/test-mcc-1023.R
  Saving _problems/test-mcc-1048.R
  Saving _problems/test-mcc-1050.R
  Saving _problems/test-mcc-1072.R
  Saving _problems/test-mcc-1205.R
  Saving _problems/test-mcc-1406.R
  Saving _problems/test-mcc-1458.R
  Saving _problems/test-mcc_equation-49.R
  Saving _problems/test-mcc_equation-173.R
  Saving _problems/test-mcc_equation-315.R
  Saving _problems/test-mcc_equation-389.R
  Saving _problems/test-mcc_equation-451.R
  Saving _problems/test-mcc_equation-783.R
  Saving _problems/test-mcc_equation-798.R
  Saving _problems/test-mcc_equation-956.R
  Saving _problems/test-mcc_sci-15.R
  Saving _problems/test-mcc_sci-57.R
  Saving _problems/test-mcc_sci-97.R
  Saving _problems/test-mcc_sci-148.R
  Saving _problems/test-mcc_sci-180.R
  Saving _problems/test-mcc_sci-206.R
  Saving _problems/test-mcc_sci-233.R
  Saving _problems/test-mcc_sci-261.R
  Saving _problems/test-mcc_sci-347.R
  Saving _problems/test-mcc_sci-365.R
  Saving _problems/test-mcc_sci-403.R
  Saving _problems/test-mcc_sci-468.R
  Saving _problems/test-mcc_sci-537.R
  Saving _problems/test-mcc_sci-569.R
  Saving _problems/test-mcc_sci-621.R
  Saving _problems/test-mcc_sci-652.R
  Saving _problems/test-mcc_sci-672.R
  Saving _problems/test-mcc_sci-701.R
  Saving _problems/test-mcc_sci-724.R
  Saving _problems/test-plot-52.R
  Saving _problems/test-plot-90.R
  Saving _problems/test-plot-129.R
  Saving _problems/test-plot-150.R
  i MCC never reaches 2 in the observed follow-up period
  i No reference lines added
  Saving _problems/test-plot-372.R
  Saving _problems/test-plot-400.R
  Saving _problems/test-plot-436.R
  Saving _problems/test-plot-471.R
  Saving _problems/test-plot-495.R
  Saving _problems/test-s3_classes-10.R
  Saving _problems/test-s3_classes-39.R
  Saving _problems/test-s3_classes-60.R
  
  -- Mean Cumulative Count Results -----------------------------------------------
  i Method: Dong-Yasui Equation Method
  
  -- MCC Estimates --
  
  # A tibble: 4 x 2
     time   mcc
    <dbl> <dbl>
  1     0 0    
  2     2 0.333
  3     6 0.667
  4     7 1    
  -- Call --
  
  mcc(data = df, id_var = "id", time_var = "time", cause_var = "cause")
  
  -- Summary of Mean Cumulative Count Results ------------------------------------
  i Method: Dong-Yasui Equation Method
  i Total participants: 4
  
  -- Summary Statistics --
  
  Observation period: [0, 8]
  Time to MCC = 1.0: 7
  Time to maximum MCC: 7
  MCC at end of follow-up: 1
  
  -- Event Count Composition 
  Events of interest: 3
  Competing risk events: 1
  Censoring events: 3
  Saving _problems/test-s3_classes-115.R
  Saving _problems/test-s3_classes-136.R
  Saving _problems/test-s3_classes-182.R
  Saving _problems/test-s3_classes-206.R
  Saving _problems/test-s3_classes-292.R
  Saving _problems/test-s3_classes-457.R
  Saving _problems/test-s3_classes-489.R
  
  -- Mean Cumulative Count Results -----------------------------------------------
  i Method: Dong-Yasui Equation Method
  
  -- MCC Estimates --
  
  -- Call --
  
  mcc(data = df_minimal, id_var = "id", time_var = "time", cause_var = "cause")
  Saving _problems/test-s3_classes-560.R
  Saving _problems/test-s3_classes-743.R
  Saving _problems/test-s3_classes-768.R
  [ FAIL 68 | WARN 0 | SKIP 24 | PASS 442 ]
  
  ══ Skipped tests (24
  • On CRAN (24):
    'test-calculation_helpers.R:482:1',
    'test-calculation_helpers.R:529:1',
    'test-calculation_helpers.R:611:1',
    'test-mcc.R:94:1',
    'test-mcc.R:191:1',
    'test-mcc.R:669:1',
    'test-mcc.R:851:1',
    'test-mcc.R:1167:1',
    'test-mcc.R:1253:1',
    'test-mcc_equation.R:203:1',
    'test-mcc_equation.R:477:1',
    'test-mcc_equation.R:652:1',
    'test-mcc_sci.R:583:1',
    'test-s3_classes.R:80:1',
    'test-s3_classes.R:509:1',
    'test-validation_helpers.R:1:1',
    'test-validation_helpers.R:44:1',
    'test-validation_helpers.R:49:1',
    'test-validation_helpers.R:57:1',
    'test-validation_helpers.R:69:1',
    'test-validation_helpers.R:101:1',
    'test-validation_helpers.R:113:1',
    'test-validation_helpers.R:142:1',
    'test-validation_helpers.R:181:1'
  
  ══ Failed tests ════
  ── Error ('test-calculation_helpers.R:21:3'): handle_simultaneous_events() works ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::handle_simultaneous_events(...)
   2.   ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc.R:25:3'): mcc() dispatches to the correct implementation based on method ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc.R:25:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc.R:71:3'): mcc() validates the method argument correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...)
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc.R:179:3'): mcc() validates tstart_var compatibility with method ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...)
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc.R:354:3'): mcc() handles method parameter with partial matching ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc.R:354:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc.R:459:3'): mcc() end-to-end functionality through snapshots ──
  Error: object 'result_sci' not found
  Backtrace:
      ▆
   1. └─base::print(result_sci$mcc_final)
  ── Error ('test-mcc.R:492:3'): mcc() produces equivalent results from both methods ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df1, id_var = "id", time_var = "time", cause_var = "cause") at test-mcc.R:492:3
   2.   └─mccount:::mcc_equation(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc.R:639:3'): mcc() correctly passes include_details parameter to implementation functions ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc.R:639:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Failure ('test-mcc.R:758:7'): mcc() with include_details=FALSE is suitable for bootstrapping ──
  Bootstrap failed: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─base::tryCatch(...) at test-mcc.R:744:3
   2.   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   3.     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   4.       └─value[[3L]](cond)
  ── Failure ('test-mcc.R:773:3'): mcc() documentation example works with include_details=FALSE ──
  Expected `{ ... }` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 5/5 in VECTOR_ELT
  ── Error ('test-mcc.R:793:3'): mcc() documentation example works with include_details=FALSE ──
  Error in `eval(code, test_env)`: object 'mcc_eq' not found
  Backtrace:
      ▆
   1. └─testthat::expect_named(...) at test-mcc.R:793:3
   2.   └─testthat::quasi_label(enquo(object), label)
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test-mcc.R:1012:3'): mcc() with by argument works with both methods ──
  Expected `... <- NULL` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  ── Error ('test-mcc.R:1023:3'): mcc() with by argument works with both methods ──
  Error in `eval(code, test_env)`: object 'result_sci' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_true("sci_table" %in% names(result_sci)) at test-mcc.R:1023:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─"sci_table" %in% names(result_sci)
  ── Failure ('test-mcc.R:1038:3'): mcc() with by argument and tstart_var works ──
  Expected `... <- NULL` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  ── Error ('test-mcc.R:1050:3'): mcc() with by argument and tstart_var works ──
  Error in `eval(code, test_env)`: object 'result_sci_tstart' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_true("sci_table" %in% names(result_sci_tstart)) at test-mcc.R:1050:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─"sci_table" %in% names(result_sci_tstart)
  ── Error ('test-mcc.R:1064:3'): mcc() with by argument preserves group information in all components ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc.R:1064:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_sci(...)
   4.       ├─dt[, `:=`(first, seq_len(.N)), by = id]
   5.       └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc.R:1197:3'): mcc() with by argument preserves group information in all components ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc.R:1197:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_sci(...)
   4.       ├─dt[, `:=`(first, seq_len(.N)), by = id]
   5.       └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc.R:1398:3'): mcc() converts numeric grouping variables to factors ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df_numeric_groups, "id", "time", "cause", by = "group_numeric")
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_equation(...)
   4.       └─mccount:::handle_simultaneous_events(...)
   5.         ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc.R:1456:3'): plotting works correctly with converted numeric groups ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df_plot_test, "id", "time", "cause", by = "treatment")
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_equation(...)
   4.       └─mccount:::handle_simultaneous_events(...)
   5.         ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_equation.R:43:3'): mcc_equation() handles simultaneous events correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_equation(...) at test-mcc_equation.R:43:3
   2.   └─mccount:::handle_simultaneous_events(...)
   3.     ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_equation.R:167:3'): mcc_equation() properly uses time_precision parameter ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_equation(...) at test-mcc_equation.R:167:3
   2.   └─mccount:::handle_simultaneous_events(...)
   3.     ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_equation.R:309:3'): mcc_equation() with include_details=FALSE works with various scenarios ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_equation(...) at test-mcc_equation.R:309:3
   2.   └─mccount:::handle_simultaneous_events(...)
   3.     ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_equation.R:384:3'): mcc_equation() with include_details=FALSE does not include adjusted_data ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_equation(...) at test-mcc_equation.R:384:3
   2.   └─mccount:::handle_simultaneous_events(...)
   3.     ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_equation.R:445:5'): mcc_equation() with include_details=FALSE provides sufficient data for bootstrapping ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_equation(...) at test-mcc_equation.R:445:5
   2.   └─mccount:::handle_simultaneous_events(...)
   3.     ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   4.     └─data.table:::`[.data.table`(...)
  ── Failure ('test-mcc_equation.R:774:3'): weighted MCC handles simultaneous events correctly ──
  Expected `... <- NULL` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 6/6 in VECTOR_ELT
  ── Error ('test-mcc_equation.R:798:3'): weighted MCC handles simultaneous events correctly ──
  Error in `eval(code, test_env)`: object 'result1' not found
  Backtrace:
      ▆
   1. └─testthat::expect_true(result1$weighted) at test-mcc_equation.R:798:3
   2.   └─testthat::quasi_label(enquo(object), label)
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Error ('test-mcc_equation.R:948:3'): weighted MCC parameter combinations work correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc_equation.R:948:3
   2.   └─mccount:::mcc_equation(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_sci.R:10:3'): mcc_sci() correctly calculates MCC with basic data ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:10:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:51:3'): mcc_sci() handles tstart_var correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:51:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:91:3'): mcc_sci() correctly handles left-truncated data ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:91:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:142:3'): mcc_sci() correctly handles simultaneous events ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:142:3
   2.   └─mccount:::handle_simultaneous_events(...)
   3.     ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_sci.R:175:3'): mcc_sci() generates correct CI columns ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:175:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:201:3'): mcc_sci() processes multiple recurrent events correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:201:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:228:3'): mcc_sci() handles recurrent events with competing risks ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:228:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:255:3'): mcc_sci() uses time_precision parameter correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:255:3
   2.   └─mccount:::handle_simultaneous_events(...)
   3.     ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_sci.R:330:3'): mcc_sci() works with snapshot testing for complex cases ──
  Error: object 'result' not found
  Backtrace:
      ▆
   1. └─base::print(length(result$all_cis))
  ── Error ('test-mcc_sci.R:360:3'): mcc_sci() respects include_details=FALSE parameter ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:360:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:397:3'): mcc_sci() with include_details=FALSE works with all key scenarios ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:397:3
   2.   └─mccount:::handle_simultaneous_events(...)
   3.     ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-mcc_sci.R:462:3'): mcc_sci() with include_details=FALSE provides sufficient data for bootstrapping ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:462:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:532:3'): mcc_sci cleans up time precision adjustments in output ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:532:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:564:3'): mcc_sci only calculates CI for event numbers with actual events ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:564:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:614:3'): grouped mcc fills missing CI columns with 0, not NA ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc_sci.R:614:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_sci(...)
   4.       ├─dt[, `:=`(first, seq_len(.N)), by = id]
   5.       └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:646:3'): mcc_sci uses time_precision parameter consistently ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:646:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:667:3'): mcc_sci handles mixed events at time 0 correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount:::mcc_sci(...) at test-mcc_sci.R:667:3
   2.   ├─dt[, `:=`(first, seq_len(.N)), by = id]
   3.   └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:695:3'): both methods show consistent time values for events at time 0 ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc_sci.R:695:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-mcc_sci.R:717:3'): CI column names are consistent across groups with different max events ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(...) at test-mcc_sci.R:717:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_sci(...)
   4.       ├─dt[, `:=`(first, seq_len(.N)), by = id]
   5.       └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-plot.R:45:3'): plot.mcc error handling works correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci", include_details = FALSE) at test-plot.R:45:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-plot.R:90:3'): plot.mcc throws error when type='components' with equation method ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "equation") at test-plot.R:90:3
   2.   └─mccount:::mcc_equation(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-plot.R:129:3'): plot.mcc works correctly with type='components' for SCI method ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-plot.R:129:3
   2.   └─mccount:::mcc_sci(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-plot.R:150:3'): plot.mcc type argument matching works correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "equation") at test-plot.R:150:3
   2.   └─mccount:::mcc_equation(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-plot.R:372:3'): geom_line_mcc works with different methods (equation vs sci) ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-plot.R:372:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-plot.R:400:3'): plot.mcc uses correct data table for each method ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-plot.R:400:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-plot.R:429:3'): plot.mcc handles grouped data correctly with both methods ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", by = "group", method = "sci") at test-plot.R:429:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_sci(...)
   4.       ├─dt[, `:=`(first, seq_len(.N)), by = id]
   5.       └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-plot.R:471:3'): plot.mcc handles group filtering correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", by = "group") at test-plot.R:471:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_equation(...)
   4.       └─mccount:::handle_simultaneous_events(...)
   5.         ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-plot.R:495:3'): plot.mcc color customization works ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause") at test-plot.R:495:3
   2.   └─mccount:::mcc_equation(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-s3_classes.R:10:3'): S3 object creation works correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "equation") at test-s3_classes.R:10:3
   2.   └─mccount:::mcc_equation(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-s3_classes.R:39:3'): Grouped S3 objects work correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", by = "group") at test-s3_classes.R:39:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_equation(...)
   4.       └─mccount:::handle_simultaneous_events(...)
   5.         ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-s3_classes.R:60:3'): Weighted S3 objects work correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", weights = "weights") at test-s3_classes.R:60:3
   2.   └─mccount:::mcc_equation(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-s3_classes.R:115:3'): Print methods work for grouped objects ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", by = "group") at test-s3_classes.R:115:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_equation(...)
   4.       └─mccount:::handle_simultaneous_events(...)
   5.         ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-s3_classes.R:136:3'): Print methods work for weighted objects ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", weights = "weights") at test-s3_classes.R:136:3
   2.   └─mccount:::mcc_equation(...)
   3.     └─mccount:::handle_simultaneous_events(...)
   4.       ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-s3_classes.R:182:3'): Grouped utility functions work correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", by = "group") at test-s3_classes.R:182:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_equation(...)
   4.       └─mccount:::handle_simultaneous_events(...)
   5.         ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-s3_classes.R:206:3'): MCC comparison print works correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-s3_classes.R:206:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-s3_classes.R:292:3'): S3 classes are assigned correctly for all combinations ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-s3_classes.R:292:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-s3_classes.R:457:3'): filter_mcc works correctly ──
  Error in ``[.data.table`(dt, , `:=`(row_within_time, seq_len(.N)), by = .(id, time))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", by = "group") at test-s3_classes.R:457:3
   2.   └─mccount:::mcc_by_group(...)
   3.     └─mccount:::mcc_equation(...)
   4.       └─mccount:::handle_simultaneous_events(...)
   5.         ├─dt[, `:=`(row_within_time, seq_len(.N)), by = .(id, time)]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-s3_classes.R:489:3'): compare_mcc works correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-s3_classes.R:489:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-s3_classes.R:560:3'): S3 method dispatch works correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-s3_classes.R:560:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-s3_classes.R:743:3'): mcc_details correctly dispatches based on class ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-s3_classes.R:743:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  ── Error ('test-s3_classes.R:768:3'): create_subtitle function works correctly ──
  Error in ``[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mccount::mcc(df, "id", "time", "cause", method = "sci") at test-s3_classes.R:768:3
   2.   └─mccount:::mcc_sci(...)
   3.     ├─dt[, `:=`(first, seq_len(.N)), by = id]
   4.     └─data.table:::`[.data.table`(dt, , `:=`(first, seq_len(.N)), by = id)
  
  [ FAIL 68 | WARN 0 | SKIP 24 | PASS 442 ]
  Error:
  ! Test
    failures.
  Execution halted