Running ‘testthat.R’ [79s/142s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(simtrial)
  > 
  > test_check("simtrial")
  Saving _problems/test-developer-get_analysis_date-18.R
  Saving _problems/test-developer-get_analysis_date-61.R
  Saving _problems/test-double_programming_mb_weight-21.R
  Saving _problems/test-double_programming_mb_weight-52.R
  Saving _problems/test-double_programming_mb_weight-83.R
  Saving _problems/test-double_programming_sim_fixed_n-44.R
  Saving _problems/test-double_programming_sim_pw_surv-5.R
  Saving _problems/test-double_programming_sim_pw_surv-19.R
  Saving _problems/test-double_programming_sim_pw_surv-28.R
  Saving _problems/test-double_programming_sim_pw_surv-36.R
  Saving _problems/test-double_programming_sim_pw_surv-49.R
  Saving _problems/test-double_programming_sim_pw_surv-64.R
  Saving _problems/test-independent_test_counting_process-12.R
  Saving _problems/test-independent_test_counting_process-32.R
  Saving _problems/test-independent_test_cut_data_by_date-2.R
  Saving _problems/test-independent_test_cut_data_by_date-16.R
  Saving _problems/test-independent_test_cut_data_by_date-27.R
  Saving _problems/test-independent_test_cut_data_by_date-37.R
  Saving _problems/test-independent_test_cut_data_by_event-2.R
  Saving _problems/test-independent_test_early_zero_weight-8.R
  Saving _problems/test-independent_test_early_zero_weight-41.R
  Saving _problems/test-independent_test_early_zero_weight-95.R
  Saving _problems/test-independent_test_early_zero_weight-148.R
  Saving _problems/test-independent_test_fh_weight-5.R
  Saving _problems/test-independent_test_fh_weight-36.R
  Saving _problems/test-independent_test_get_cut_date_by_event-5.R
  Saving _problems/test-independent_test_pvalue_maxcombo-7.R
  Saving _problems/test-independent_test_simfix2simpwsurv-2.R
  Saving _problems/test-independent_test_simfix2simpwsurv-21.R
  Saving _problems/test-independent_test_simfix2simpwsurv-35.R
  Saving _problems/test-independent_test_simfix2simpwsurv-45.R
  Saving _problems/test-independent_test_simfix2simpwsurv-54.R
  Saving _problems/test-independent_test_simfix2simpwsurv-64.R
  Saving _problems/test-independent_test_simfix2simpwsurv-75.R
  Saving _problems/test-independent_test_simfix2simpwsurv-83.R
  Saving _problems/test-independent_test_simfix2simpwsurv-91.R
  Saving _problems/test-independent_test_simfix2simpwsurv-98.R
  Saving _problems/test-independent_test_wlr-7.R
  Saving _problems/test-independent_test_wlr-55.R
  Saving _problems/test-independent_test_wlr-90.R
  Saving _problems/test-independent_test_wlr-144.R
  Saving _problems/test-independent_test_wlr-186.R
  Saving _problems/test-independent_test_wlr-233.R
  Saving _problems/test-unvalidated-data.table-11.R
  Saving _problems/test-unvalidated-data.table-70.R
  Saving _problems/test-unvalidated-early_zero_weight-8.R
  Saving _problems/test-unvalidated-early_zero_weight-43.R
  Saving _problems/test-unvalidated-early_zero_weight-92.R
  Saving _problems/test-unvalidated-get_analysis_date-4.R
  Saving _problems/test-unvalidated-get_analysis_date-12.R
  Saving _problems/test-unvalidated-get_analysis_date-20.R
  Saving _problems/test-unvalidated-get_analysis_date-32.R
  Saving _problems/test-unvalidated-get_analysis_date-43.R
  Saving _problems/test-unvalidated-get_analysis_date-55.R
  Saving _problems/test-unvalidated-get_analysis_date-67.R
  Saving _problems/test-unvalidated-get_analysis_date-81.R
  Saving _problems/test-unvalidated-get_analysis_date-93.R
  Saving _problems/test-unvalidated-get_analysis_date-105.R
  Saving _problems/test-unvalidated-get_analysis_date-120.R
  Saving _problems/test-unvalidated-maxcombo-8.R
  Saving _problems/test-unvalidated-maxcombo-14.R
  Saving _problems/test-unvalidated-multitest-2.R
  Backend uses sequential processing.
  Saving _problems/test-unvalidated-sim_gs_n-84.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-125.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-166.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-206.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-246.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-285.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-324.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-365.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-413.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-455.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-513.R
  Using 2 cores with backend multisession
  Saving _problems/test-unvalidated-sim_gs_n-529.R
  Saving _problems/test-unvalidated-sim_gs_n-625.R
  Saving _problems/test-unvalidated-sim_gs_n-668.R
  Saving _problems/test-unvalidated-sim_gs_n-734.R
  Saving _problems/test-unvalidated-summary-36.R
  Saving _problems/test-unvalidated-summary-126.R
  Saving _problems/test-unvalidated-wlr-3.R
  Saving _problems/test-unvalidated-wlr-35.R
  Saving _problems/test-unvalidated-wlr-49.R
  Saving _problems/test-unvalidated-wlr-55.R
  Saving _problems/test-unvalidated-wlr-63.R
  Saving _problems/test-unvalidated-wlr-91.R
  Saving _problems/test-unvalidated-wlr-123.R
  Saving _problems/test-unvalidated-wlr-136.R
  Saving _problems/test-unvalidated-wlr-150.R
  [ FAIL 89 | WARN 12 | SKIP 0 | PASS 77 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-developer-get_analysis_date.R:2:3'): Cut by targeted event per stratum ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(...) at test-developer-get_analysis_date.R:2:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-developer-get_analysis_date.R:45:3'): Cut by targeted sample size per stratum ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(...) at test-developer-get_analysis_date.R:45:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_mb_weight.R:19:3'): mb_weight works for single stratum ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::counting_process(...) at test-double_programming_mb_weight.R:19:3
   2. │ └─base::unique(x$treatment)
   3. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 200), 125)
   4. │ └─simtrial::get_cut_date_by_event(x, event)
   5. │   └─data.table::as.data.table(x)
   6. └─simtrial::sim_pw_surv(n = 200)
   7.   ├─...[]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_mb_weight.R:32:3'): mb_weight works for multiple strata ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::counting_process(...) at test-double_programming_mb_weight.R:32:3
   2. │ └─base::unique(x$treatment)
   3. ├─simtrial::cut_data_by_event(...)
   4. │ └─simtrial::get_cut_date_by_event(x, event)
   5. │   └─data.table::as.data.table(x)
   6. └─simtrial::sim_pw_surv(...)
   7.   ├─...[]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_mb_weight.R:63:3'): mb_weight works for a stratum with no records before delay ends ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::counting_process(...) at test-double_programming_mb_weight.R:63:3
   2. │ └─base::unique(x$treatment)
   3. ├─simtrial::cut_data_by_event(...)
   4. │ └─simtrial::get_cut_date_by_event(x, event)
   5. │   └─data.table::as.data.table(x)
   6. └─simtrial::sim_pw_surv(...)
   7.   ├─...[]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_sim_fixed_n.R:24:3'): Double programming of sim_fixed_n ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_fixed_n(...) at test-double_programming_sim_fixed_n.R:24:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_sim_pw_surv.R:5:3'): stratum percentage calculated from simulated dataset must be within
            the tolerance=0.002 of stratum in setup (0.4,0.6) ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_sim_pw_surv() at test-double_programming_sim_pw_surv.R:5:3
   2.   └─simtrial::sim_pw_surv(...) at ./helper-sim_pw_surv.R:27:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_sim_pw_surv.R:19:3'): block calculated from simulated dataset equals size of 4 with 1:1
            randomization, which is 2 for each arm ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_sim_pw_surv() at test-double_programming_sim_pw_surv.R:19:3
   2.   └─simtrial::sim_pw_surv(...) at ./helper-sim_pw_surv.R:27:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_sim_pw_surv.R:28:3'): fail_rate calculated from simulated dataset must be within the
            tolerance=0.1 of fail_rate in setting ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_sim_pw_surv() at test-double_programming_sim_pw_surv.R:28:3
   2.   └─simtrial::sim_pw_surv(...) at ./helper-sim_pw_surv.R:27:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_sim_pw_surv.R:36:3'): dropout_rate calculated from simulated dataset must be within
            the tolerance=0.0005 of dropout_rate=0.001 in setup ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_sim_pw_surv() at test-double_programming_sim_pw_surv.R:36:3
   2.   └─simtrial::sim_pw_surv(...) at ./helper-sim_pw_surv.R:27:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_sim_pw_surv.R:49:3'): enroll_rate calculated from simulated dataset must be within
            the relative tolerance=0.05 of enroll_rate in setup ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_sim_pw_surv() at test-double_programming_sim_pw_surv.R:49:3
   2.   └─simtrial::sim_pw_surv(...) at ./helper-sim_pw_surv.R:27:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_sim_pw_surv.R:64:3'): The actual number of events changes by changing total sample size ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_sim_pw_surv() at test-double_programming_sim_pw_surv.R:64:3
   2.   └─simtrial::sim_pw_surv(...) at ./helper-sim_pw_surv.R:27:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-double_programming_sim_pw_surv.R:90:3'): sim_pw_surv() fails early with mismatched treatment names ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test-double_programming_sim_pw_surv.R:90:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─simtrial::sim_pw_surv(block = block, fail_rate = fail_rate, dropout_rate = dropout_rate)
   10.   ├─...[]
   11.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_counting_process.R:12:3'): Counting Process Format without ties ──
  Error in ``[.data.table`(ans, , `:=`(n_risk_total = cumsum(one), n_risk_trt = cumsum(treatment == arm)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::counting_process(x, arm) at test-independent_test_counting_process.R:12:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_counting_process.R:32:3'): Counting Process Format with ties ──
  Error in ``[.data.table`(ans, , `:=`(n_risk_total = cumsum(one), n_risk_trt = cumsum(treatment == arm)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::counting_process(x, arm) at test-independent_test_counting_process.R:32:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_cut_data_by_date.R:2:3'): x is a time-to-event data set ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(n = 200) at test-independent_test_cut_data_by_date.R:2:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_cut_data_by_date.R:16:3'): only patients recorded by cut_data_by_date are included ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(n = 200) at test-independent_test_cut_data_by_date.R:16:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_cut_data_by_date.R:27:3'): Time-to-event (TTE) is cut off at the cut_date ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(n = 200) at test-independent_test_cut_data_by_date.R:27:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_cut_data_by_date.R:37:3'): the event variable is calculated correctly ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(n = 200) at test-independent_test_cut_data_by_date.R:37:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_cut_data_by_event.R:2:3'): the input is a time-to-event data set ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(n = 200) at test-independent_test_cut_data_by_event.R:2:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_early_zero_weight.R:5:3'): early_zero_weight() with unstratified data ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─simtrial:::early_zero_weight(...) at test-independent_test_early_zero_weight.R:5:3
    2. │ └─data.table::as.data.table(x)
    3. ├─simtrial::counting_process(...)
    4. │ └─base::unique(x$treatment)
    5. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 200), 125)
    6. │ └─simtrial::get_cut_date_by_event(x, event)
    7. │   └─data.table::as.data.table(x)
    8. └─simtrial::sim_pw_surv(n = 200)
    9.   ├─...[]
   10.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_early_zero_weight.R:41:3'): early_zero_weight() with stratified data when fail_rate is not provided ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::to_sim_pw_surv(fail_rate) at test-independent_test_early_zero_weight.R:41:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_early_zero_weight.R:95:3'): early_zero_weight() with stratified data when fail_rate is not correctly provided ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::to_sim_pw_surv(fail_rate) at test-independent_test_early_zero_weight.R:95:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_early_zero_weight.R:148:3'): early_zero_weight() with stratified data when fail_rate is correctly provided ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::to_sim_pw_surv(fail_rate) at test-independent_test_early_zero_weight.R:148:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_fh_weight.R:5:3'): the z values match with the correspondings in fh_weight ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 300), 30) at test-independent_test_fh_weight.R:5:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 300)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_fh_weight.R:36:3'): fh_weight calculated correct correlation value when input a sequence of rho and gamma ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 300), 30) at test-independent_test_fh_weight.R:36:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 300)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_get_cut_date_by_event.R:5:3'): get_cut_date_by_event returns the correct cut date ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(n = 200) at test-independent_test_get_cut_date_by_event.R:5:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_pvalue_maxcombo.R:7:3'): the p-values correspond to pvalue_maxcombo ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 300), 30) at test-independent_test_pvalue_maxcombo.R:7:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 300)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:2:3'): stratum values must be the same and stratum length must be doubled after converting ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:2:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:21:3'): treatment after converting contains only control and experimental with the right length ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:21:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:35:3'): Duration values match before and after converting and in right length  ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:35:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:45:3'): fail_rate match before and after converting and are in right length  ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:45:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:54:3'): dropout_rate match before and after converting and are in right length  ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:54:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:64:3'): fail_rate column names must contain stratum, duration, fail_rate, hr and dropout_rate ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:64:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:75:3'): duration must be longer than 0 ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:75:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:83:3'): fail_rate must be smaller than 1 and positive ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:83:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:91:3'): hr must be postiive ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:91:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_simfix2simpwsurv.R:98:3'): dropout_rate must be smaller than 1 and positive ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_simfix2simpwsurv() at test-independent_test_simfix2simpwsurv.R:98:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-simfix2simpwsurv.R:18:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_wlr.R:7:3'): wlr() with FH weight on unstratified data ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 200), 125) at test-independent_test_wlr.R:7:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 200)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_wlr.R:55:3'): wlr() with FH weight on stratified data ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::to_sim_pw_surv(fail_rate) at test-independent_test_wlr.R:55:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_wlr.R:90:3'): wlr() with MB weight on unstratified data ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 200), 125) at test-independent_test_wlr.R:90:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 200)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_wlr.R:144:3'): wlr() with MB weight on stratified data ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::to_sim_pw_surv(fail_rate) at test-independent_test_wlr.R:144:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_wlr.R:186:3'): wlr() with early_zero_weight on unstratified data ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 200), 125) at test-independent_test_wlr.R:186:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 200)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-independent_test_wlr.R:233:3'): wlr() with early_zero_weight on stratified data ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::to_sim_pw_surv(fail_rate) at test-independent_test_wlr.R:233:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-data.table.R:11:3'): functions that use data.table still return a data frame ──
  Error in ``[.data.table`(ans, , `:=`(n_risk_total = cumsum(one), n_risk_trt = cumsum(treatment == arm)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_identical(...) at test-unvalidated-data.table.R:11:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─simtrial::counting_process(x, arm = 1)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-data.table.R:70:3'): functions that use data.table do not modify input data table ──
  Error in ``[.data.table`(ans, , `:=`(n_risk_total = cumsum(one), n_risk_trt = cumsum(treatment == arm)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::counting_process(x, arm = 1) at test-unvalidated-data.table.R:70:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-early_zero_weight.R:5:3'): early_zero_weight() with unstratified data ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─simtrial:::early_zero_weight(...) at test-unvalidated-early_zero_weight.R:5:3
    2. │ └─data.table::as.data.table(x)
    3. ├─simtrial::counting_process(...)
    4. │ └─base::unique(x$treatment)
    5. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 200), 125)
    6. │ └─simtrial::get_cut_date_by_event(x, event)
    7. │   └─data.table::as.data.table(x)
    8. └─simtrial::sim_pw_surv(n = 200)
    9.   ├─...[]
   10.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-early_zero_weight.R:43:3'): early_zero_weight() with stratified data ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::to_sim_pw_surv(fail_rate) at test-unvalidated-early_zero_weight.R:43:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-early_zero_weight.R:92:3'): early_zero_weight() fails with bad input ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::to_sim_pw_surv(fail_rate) at test-unvalidated-early_zero_weight.R:92:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:4:3'): planned_calendar_time ───
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:4:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:12:3'): target_event_overall ───
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:12:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:20:3'): planned_calendar_time + target_event_overall ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:20:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:32:3'): target_event_per_stratum ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:32:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:43:3'): target_event_overall + target_event_per_stratum ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:43:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:55:3'): target_event_per_stratum + max_extension_for_target_event ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:55:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:67:3'): min_n_overall + min_followup ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:67:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:81:3'): min_n_per_stratum + min_followup ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:81:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:93:3'): min_n_per_stratum + min_followup (requirement for only one stratum) ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:93:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:105:3'): min_n_overall + min_n_per_stratum + min_followup ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:105:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-get_analysis_date.R:120:3'): get_analysis_date() fails early with bad input ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial:::test_get_analysis_date() at test-unvalidated-get_analysis_date.R:120:3
   2.   └─simtrial::to_sim_pw_surv(fail_rate) at ./helper-get_analysis_date.R:34:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-maxcombo.R:6:3'): maxcombo returns consistent results ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::maxcombo(...) at test-unvalidated-maxcombo.R:6:3
   2. │ └─simtrial::counting_process(data, arm = "experimental")
   3. │   └─base::unique(x$treatment)
   4. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 200), 150)
   5. │ └─simtrial::get_cut_date_by_event(x, event)
   6. │   └─data.table::as.data.table(x)
   7. └─simtrial::sim_pw_surv(n = 200)
   8.   ├─...[]
   9.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-maxcombo.R:14:3'): maxcombo fails early with bad input ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 200), 150) at test-unvalidated-maxcombo.R:14:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 200)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-multitest.R:2:3'): multitest() is equivalent to running tests individually ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(n = 200) at test-unvalidated-multitest.R:2:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-sim_gs_n.R:75:3'): regular logrank test ────────────
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─dplyr::select(...) at test-unvalidated-sim_gs_n.R:75:3
   2. └─simtrial::sim_gs_n(...)
   3.   └─... %dofuture% ...
   4.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   5.       └─base::tryCatch(...)
   6.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   7.           └─base (local) tryCatchOne(...)
   8.             └─value[[3L]](cond)
   9.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:116:3'): regular logrank test parallel ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─dplyr::select(...) at test-unvalidated-sim_gs_n.R:116:3
   2. └─simtrial::sim_gs_n(...)
   3.   └─... %dofuture% ...
   4.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   5.       └─base::tryCatch(...)
   6.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   7.           └─base (local) tryCatchOne(...)
   8.             └─value[[3L]](cond)
   9.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:157:3'): weighted logrank test by FH(0, 0.5) ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─dplyr::select(...) at test-unvalidated-sim_gs_n.R:157:3
   2. └─simtrial::sim_gs_n(...)
   3.   └─... %dofuture% ...
   4.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   5.       └─base::tryCatch(...)
   6.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   7.           └─base (local) tryCatchOne(...)
   8.             └─value[[3L]](cond)
   9.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:197:3'): weighted logrank test by MB(3) ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─dplyr::select(...) at test-unvalidated-sim_gs_n.R:197:3
   2. └─simtrial::sim_gs_n(...)
   3.   └─... %dofuture% ...
   4.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   5.       └─base::tryCatch(...)
   6.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   7.           └─base (local) tryCatchOne(...)
   8.             └─value[[3L]](cond)
   9.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:237:3'): weighted logrank test by early zero (6) ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─dplyr::select(...) at test-unvalidated-sim_gs_n.R:237:3
   2. └─simtrial::sim_gs_n(...)
   3.   └─... %dofuture% ...
   4.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   5.       └─base::tryCatch(...)
   6.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   7.           └─base (local) tryCatchOne(...)
   8.             └─value[[3L]](cond)
   9.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:277:3'): RMST ───────────────────────────
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_gs_n(...) at test-unvalidated-sim_gs_n.R:277:3
   2.   └─... %dofuture% ...
   3.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   4.       └─base::tryCatch(...)
   5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   6.           └─base (local) tryCatchOne(...)
   7.             └─value[[3L]](cond)
   8.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:315:3'): Milestone ──────────────────────
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_gs_n(...) at test-unvalidated-sim_gs_n.R:315:3
   2.   └─... %dofuture% ...
   3.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   4.       └─base::tryCatch(...)
   5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   6.           └─base (local) tryCatchOne(...)
   7.             └─value[[3L]](cond)
   8.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:358:3'): WLR with fh(0, 0.5) test at IA1, WLR with mb(6, Inf) at IA2, and milestone test at FA ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_gs_n(...) at test-unvalidated-sim_gs_n.R:358:3
   2.   └─... %dofuture% ...
   3.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   4.       └─base::tryCatch(...)
   5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   6.           └─base (local) tryCatchOne(...)
   7.             └─value[[3L]](cond)
   8.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:404:3'): MaxCombo (WLR-FH(0,0) + WLR-FH(0, 0.5)) ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_gs_n(...) at test-unvalidated-sim_gs_n.R:404:3
   2.   └─... %dofuture% ...
   3.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   4.       └─base::tryCatch(...)
   5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   6.           └─base (local) tryCatchOne(...)
   7.             └─value[[3L]](cond)
   8.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:448:3'): sim_gs_n() accepts different tests per cutting ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_gs_n(...) at test-unvalidated-sim_gs_n.R:448:3
   2.   └─... %dofuture% ...
   3.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   4.       └─base::tryCatch(...)
   5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   6.           └─base (local) tryCatchOne(...)
   7.             └─value[[3L]](cond)
   8.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:503:3'): sim_gs_n() requires a test for each cutting ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-unvalidated-sim_gs_n.R:503: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. └─simtrial::sim_gs_n(...)
    8.   └─... %dofuture% ...
    9.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   10.       └─base::tryCatch(...)
   11.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   12.           └─base (local) tryCatchOne(...)
   13.             └─value[[3L]](cond)
   14.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:522:3'): sim_gs_n() can combine wlr(), rmst(), and milestone() tests ──
  Error in ``[.data.table`(fr_control, , `:=`(treatment = "control", rate = fail_rate, period = seq_len(.N)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_gs_n(...) at test-unvalidated-sim_gs_n.R:522:3
   2.   └─... %dofuture% ...
   3.     └─doFuture:::doFuture2(foreach, expr, envir = parent.frame(), data = NULL)
   4.       └─base::tryCatch(...)
   5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   6.           └─base (local) tryCatchOne(...)
   7.             └─value[[3L]](cond)
   8.               └─doFuture:::onError(e, futures = fs, debug = debug)
  ── Error ('test-unvalidated-sim_gs_n.R:620:3'): create_cut() can accept variables as arguments ──
  Error in ``[.data.table`(tbl_event, , `:=`(info0, event * q_c * q_e), by = .(time))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─gsDesign2::to_integer(...) at test-unvalidated-sim_gs_n.R:620:3
   2. └─gsDesign2::gs_design_ahr(...)
   3.   └─gsDesign2::gs_info_ahr(...)
   4.     ├─dplyr::select(...)
   5.     └─gsDesign2::ahr(...)
   6.       └─gsDesign2::pw_info(...)
   7.         ├─tbl_event[, `:=`(info0, event * q_c * q_e), by = .(time)]
   8.         └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-sim_gs_n.R:667:3'): Updating bounds changes the simulation results ──
  Error in ``[.data.table`(tbl_event, , `:=`(info0, event * q_c * q_e), by = .(time))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─gsDesign2::to_integer(...) at test-unvalidated-sim_gs_n.R:667:3
   2. └─gsDesign2::gs_design_ahr(analysis_time = 1:3 * 12)
   3.   └─gsDesign2::gs_info_ahr(...)
   4.     ├─dplyr::select(...)
   5.     └─gsDesign2::ahr(...)
   6.       └─gsDesign2::pw_info(...)
   7.         ├─tbl_event[, `:=`(info0, event * q_c * q_e), by = .(time)]
   8.         └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-sim_gs_n.R:724:3'): sim_gs_n() can update bounds even when some are missing ──
  Error in ``[.data.table`(tbl_event, , `:=`(info0, event * q_c * q_e), by = .(time))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─gsDesign2::to_integer(...) at test-unvalidated-sim_gs_n.R:724:3
   2. └─gsDesign2::gs_design_ahr(...)
   3.   └─gsDesign2::gs_info_ahr(...)
   4.     ├─dplyr::select(...)
   5.     └─gsDesign2::ahr(...)
   6.       └─gsDesign2::pw_info(...)
   7.         ├─tbl_event[, `:=`(info0, event * q_c * q_e), by = .(time)]
   8.         └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-summary.R:29:3'): summary.simtrial_gs_wlr() returns consistent results for one-sided design ──
  Error in ``[.data.table`(tbl_event, , `:=`(info0, event * q_c * q_e), by = .(time))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─gsDesign2::gs_design_ahr(...) at test-unvalidated-summary.R:29:3
   2.   └─gsDesign2::gs_info_ahr(...)
   3.     ├─dplyr::select(...)
   4.     └─gsDesign2::ahr(...)
   5.       └─gsDesign2::pw_info(...)
   6.         ├─tbl_event[, `:=`(info0, event * q_c * q_e), by = .(time)]
   7.         └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-summary.R:119:3'): summary.simtrial_gs_wlr() returns consistent results for two-sided design ──
  Error in ``[.data.table`(tbl_event, , `:=`(info0, event * q_c * q_e), by = .(time))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─gsDesign2::gs_design_ahr(...) at test-unvalidated-summary.R:119:3
   2.   └─gsDesign2::gs_info_ahr(...)
   3.     ├─dplyr::select(...)
   4.     └─gsDesign2::ahr(...)
   5.       └─gsDesign2::pw_info(...)
   6.         ├─tbl_event[, `:=`(info0, event * q_c * q_e), by = .(time)]
   7.         └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:3:3'): wlr() accepts tte_data and counting_process objects as input ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 300), 100) at test-unvalidated-wlr.R:3:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 300)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:35:3'): wlr() accepts unclassed input object with proper columns ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 300), 100) at test-unvalidated-wlr.R:35:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 300)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:49:3'): wlr() uses argument ratio ────────────
  Error in ``[.data.table`(ans, , `:=`(n_risk_total = cumsum(one), n_risk_trt = cumsum(treatment == arm)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::wlr(x, weight = fh(rho = 0, gamma = 0.5), ratio = 2) at test-unvalidated-wlr.R:49:3
   2. └─simtrial:::wlr.default(...)
   3.   └─simtrial:::wlr.tte_data(...)
   4.     └─simtrial::counting_process(data, arm = "experimental")
   5.       ├─...[]
   6.       └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:55:3'): cut_data_by_date() and cut_data_by_event() return the same classes ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─simtrial::sim_pw_surv(n = 300) at test-unvalidated-wlr.R:55:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:63:3'): wlr() formula argument can rename columns ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 300), 100) at test-unvalidated-wlr.R:63:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 300)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:87:3'): wlr() accepts formula for unstratified design ──
  Error in ``[.data.table`(ans, , `:=`(n_risk_total = cumsum(one), n_risk_trt = cumsum(treatment == arm)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::wlr(...) at test-unvalidated-wlr.R:87:3
   2. └─simtrial:::wlr.default(...)
   3.   └─simtrial:::wlr.tte_data(...)
   4.     └─simtrial::counting_process(data, arm = "experimental")
   5.       ├─...[]
   6.       └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:119:3'): wlr() accepts formula for stratified design ──
  Error in ``[.data.table`(ans, , `:=`(n_risk_total = cumsum(one), n_risk_trt = cumsum(treatment == arm)), by = "stratum")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::wlr(...) at test-unvalidated-wlr.R:119:3
   2. └─simtrial:::wlr.default(...)
   3.   └─simtrial:::wlr.tte_data(...)
   4.     └─simtrial::counting_process(data, arm = "experimental")
   5.       ├─...[]
   6.       └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:136:3'): wlr() warns when formula argument is ignored ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 300), 100) at test-unvalidated-wlr.R:136:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 300)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-unvalidated-wlr.R:150:3'): wlr.default() and wlr.tte_data() require arm='experimental' ──
  Error in ``[.data.table`(x, , `:=`(treatment, randomize_by_fixed_block(n = .N, block = block)), by = "stratum")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─simtrial::cut_data_by_event(sim_pw_surv(n = 300), 100) at test-unvalidated-wlr.R:150:3
   2. │ └─simtrial::get_cut_date_by_event(x, event)
   3. │   └─data.table::as.data.table(x)
   4. └─simtrial::sim_pw_surv(n = 300)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  
  [ FAIL 89 | WARN 12 | SKIP 0 | PASS 77 ]
  Error:
  ! Test failures.
  Execution halted