Running ‘testthat.R’ [136s/126s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ## * load packages
  > library(testthat)
  > library(BuyseTest)
  Loading required package: Rcpp
  BuyseTest version 3.3.4
  > 
  > library(lava)
  
  Attaching package: 'lava'
  
  The following object is masked from 'package:testthat':
  
      compare
  
  > library(data.table)
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  > library(survival)
  
  Attaching package: 'survival'
  
  The following object is masked from 'package:BuyseTest':
  
      brier
  
  > xx <- capture.output(print(veteran))
  > library(riskRegression)
  riskRegression version 2025.09.17
  > library(prodlim)
  > library(mvtnorm)
  > 
  > ## * run tests
  > ## setwd("~/Documents/GitHub/BuyseTest/tests/")
  > ## source("~/Documents/GitHub/BuyseTest/tests/testthat/test-BuyseTest-engine.R")
  > test_check("BuyseTest")
  Saving _problems/test-BuysePower-92.R
  Saving _problems/test-BuysePower-132.R
  Saving _problems/test-BuysePower-174.R
  Saving _problems/test-BuyseTTEM-34.R
  Saving _problems/test-BuyseTest-standardization-184.R
  Saving _problems/test-BuyseTest-standardization-212.R
  [ FAIL 6 | WARN 0 | SKIP 2 | PASS 1157 ]
  
  ══ Skipped tests (2) ═══════════════════════════════════════════════════════════
  • empty test (2): 'test-BuyseTest-previousBug.R:554:1',
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-BuysePower.R:92:9'): 1 tte endpoint - Gehan ────────────────────
  Error in ``[.data.table`(d, , `:=`(id, 1:.N), by = "treatment")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─d[, `:=`(id, 1:.N), by = "treatment"] at test-BuysePower.R:92:9
   2. └─data.table:::`[.data.table`(d, , `:=`(id, 1:.N), by = "treatment") at test-BuysePower.R:92:9
  ── Error ('test-BuysePower.R:132:9'): 1 tte endpoint - Peron ───────────────────
  Error in ``[.data.table`(d, , `:=`(id, 1:.N), by = "treatment")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─d[, `:=`(id, 1:.N), by = "treatment"] at test-BuysePower.R:132:9
   2. └─data.table:::`[.data.table`(d, , `:=`(id, 1:.N), by = "treatment") at test-BuysePower.R:132:9
  ── Error ('test-BuysePower.R:174:9'): Multiple endpoints ───────────────────────
  Error in ``[.data.table`(d, , `:=`(id, 1:.N), by = "treatment")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─d[, `:=`(id, 1:.N), by = "treatment"] at test-BuysePower.R:174:9
   2. └─data.table:::`[.data.table`(d, , `:=`(id, 1:.N), by = "treatment") at test-BuysePower.R:174:9
  ── Error ('test-BuyseTTEM.R:34:1'): (code run outside of `test_that()`) ────────
  Error in ``[.data.table`(dt, , `:=`(last, eventtime == max(eventtime)), by = c("treatment", "toxicity"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─...[] at test-BuyseTTEM.R:34:1
   2. └─data.table:::`[.data.table`(...) at test-BuyseTTEM.R:34:1
  ── Error ('test-BuyseTest-standardization.R:184:5'): BuyseTest - standarization (second order, binary outcome, balanced) ──
  Error in ``[.data.table`(mytable, , `:=`(m.X, length(unique(index.0))), by = "strata")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─mytable[, `:=`(m.X, length(unique(index.0))), by = "strata"] at test-BuyseTest-standardization.R:184:5
   2. └─data.table:::`[.data.table`(...) at test-BuyseTest-standardization.R:184:5
  ── Error ('test-BuyseTest-standardization.R:212:5'): BuyseTest - standarization (second order, binary outcome, unbalanced) ──
  Error in ``[.data.table`(mytableUB, , `:=`(m.X, length(unique(index.0))), by = "strata")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─mytableUB[, `:=`(m.X, length(unique(index.0))), by = "strata"] at test-BuyseTest-standardization.R:212:5
   2. └─data.table:::`[.data.table`(...) at test-BuyseTest-standardization.R:212:5
  
  [ FAIL 6 | WARN 0 | SKIP 2 | PASS 1157 ]
  Error:
  ! Test failures.
  Execution halted