Running ‘testthat.R’ [31s/42s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ## * load packages
  > library(testthat)
  > library(BuyseTest)
  Loading required package: Rcpp
  BuyseTest version 3.0.5
  > 
  > library(lava)
  
  Attaching package: 'lava'
  
  The following object is masked from 'package:testthat':
  
      compare
  
  > library(data.table)
  > library(survival)
  
  Attaching package: 'survival'
  
  The following object is masked from 'package:BuyseTest':
  
      brier
  
  > xx <- capture.output(print(veteran))
  > library(riskRegression)
  riskRegression version 2023.12.21
  > library(prodlim)
  > library(mvtnorm)
  > 
  > ## * run tests
  > ## setwd("~/Documents/GitHub/BuyseTest/tests/")
  > ## source("~/Documents/GitHub/BuyseTest/tests/testthat/test-BuyseTest-engine.R")
  > test_check("BuyseTest")
  [ FAIL 15 | WARN 6 | SKIP 0 | PASS 553 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-BuysePower.R:78:5'): 1 tte endpoint - Gehan ────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::powerBuyseTest(...) at test-BuysePower.R:78:5
    2.   └─BuyseTest (local) sim(n.C = 10, n.T = 10)
    3.     ├─lava::`distribution<-`(...)
    4.     └─lava:::`distribution<-.lvm`(...)
    5.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.       └─lava:::`addvar<-.lvm`(...)
    7.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.           └─lava::procformula(object, value, ...)
   10.             ├─lava::`exogenous<-`(...)
   11.             └─lava:::`exogenous<-.lvm`(...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-BuysePower.R:118:5'): 1 tte endpoint - Peron ───────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::powerBuyseTest(...) at test-BuysePower.R:118:5
    2.   └─BuyseTest (local) sim(n.C = 10, n.T = 10)
    3.     ├─lava::`distribution<-`(...)
    4.     └─lava:::`distribution<-.lvm`(...)
    5.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.       └─lava:::`addvar<-.lvm`(...)
    7.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.           └─lava::procformula(object, value, ...)
   10.             ├─lava::`exogenous<-`(...)
   11.             └─lava:::`exogenous<-.lvm`(...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-BuysePower.R:160:5'): Multiple endpoints ───────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::powerBuyseTest(...) at test-BuysePower.R:160:5
    2.   └─BuyseTest (local) sim(n.C = 10, n.T = 10)
    3.     ├─lava::`distribution<-`(...)
    4.     └─lava:::`distribution<-.lvm`(...)
    5.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.       └─lava:::`addvar<-.lvm`(...)
    7.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.           └─lava::procformula(object, value, ...)
   10.             ├─lava::`exogenous<-`(...)
   11.             └─lava:::`exogenous<-.lvm`(...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTTEM.R:33:1'): (code run outside of `test_that()`) ────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(100) at test-BuyseTTEM.R:33:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-PairScore.R:38:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(...) at test-BuyseTest-PairScore.R:38:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-checkValues.R:20:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(...) at test-BuyseTest-checkValues.R:20:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-correctionTTE.R:194:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(n.T = 20, n.C = 20) at test-BuyseTest-correctionTTE.R:194:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-engine.R:36:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(...) at test-BuyseTest-engine.R:36:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-iid.R:222:1'): (code run outside of `test_that()`) ───
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(n, name.cluster = NULL) at test-BuyseTest-iid.R:222:1
    2.   └─lava::`categorical<-`(`*tmp*`, labels = level.treatment[1], value = name.treatment)
    3.     └─lava::categorical(x, value, ...)
    4.       ├─lava::`ordinal<-`(...)
    5.       └─lava:::`ordinal<-.lvm`(...)
    6.         ├─lava::ordinal(x, value, ...)
    7.         └─lava:::ordinal.lvm(x, value, ...)
    8.           ├─lava::`addvar<-`(`*tmp*`, value = var)
    9.           └─lava:::`addvar<-.lvm`(`*tmp*`, value = var)
   10.             ├─lava::addvar(x, var = value, ...)
   11.             └─lava:::addvar.lvm(x, var = value, ...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-multcomp.R:36:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(n) at test-BuyseTest-multcomp.R:36:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-previousBug.R:259:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(50) at test-BuyseTest-previousBug.R:259:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-resampling.R:38:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(...) at test-BuyseTest-resampling.R:38:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-restricted.R:35:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. ├─base::as.data.frame(simBuyseTest(n.obs)) at test-BuyseTest-restricted.R:35:1
    2. └─BuyseTest::simBuyseTest(n.obs)
    3.   ├─lava::`distribution<-`(...)
    4.   └─lava:::`distribution<-.lvm`(...)
    5.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.     └─lava:::`addvar<-.lvm`(...)
    7.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.         └─lava::procformula(object, value, ...)
   10.           ├─lava::`exogenous<-`(...)
   11.           └─lava:::`exogenous<-.lvm`(...)
   12.             └─lava::reindex(x)
   13.               └─lava:::mat.lvm(x, res)
   14.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BuyseTest-strata.R:34:1'): (code run outside of `test_that()`) ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(...) at test-BuyseTest-strata.R:34:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-initThreshold.R:32:1'): (code run outside of `test_that()`) ────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─BuyseTest::simBuyseTest(10) at test-initThreshold.R:32:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  
  [ FAIL 15 | WARN 6 | SKIP 0 | PASS 553 ]
  Error: Test failures
  Execution halted