Running ‘testthat.R’ [22s/28s]
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(cramR)
  > 
  > # Suppress the creation of __pycache__ directories during Python-related operations
  > Sys.setenv(PYTHONDONTWRITEBYTECODE = 1)
  > 
  > test_check("cramR")
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  Simulation horizon: 100
  Number of simulations: 11
  Number of batches: 1
  Starting main loop.
  Finished main loop.
  Completed simulation in 0:00:01.104
  Computing statistics.
  Saving _problems/test_cram_bandit_sim-15.R
  Simulation horizon: 100
  Number of simulations: 11
  Number of batches: 1
  Starting main loop.
  Finished main loop.
  Completed simulation in 0:00:00.799
  Computing statistics.
  Saving _problems/test_cram_bandit_sim-32.R
  Simulation horizon: 100
  Number of simulations: 11
  Number of batches: 1
  Starting main loop.
  Finished main loop.
  Completed simulation in 0:00:00.684
  Computing statistics.
  Saving _problems/test_cram_bandit_sim-49.R
  Simulation horizon: 100
  Number of simulations: 11
  Number of batches: 1
  Starting main loop.
  Finished main loop.
  Completed simulation in 0:00:00.683
  Computing statistics.
  Saving _problems/test_cram_bandit_sim-67.R
  Simulation horizon: 20
  Number of simulations: 6
  Number of batches: 1
  Starting main loop.
  Finished main loop.
  Completed simulation in 0:00:00.666
  Computing statistics.
  Saving _problems/test_cram_bandit_sim-85.R
  
  Attaching package: 'waldo'
  
  The following object is masked from 'package:testthat':
  
      compare
  
  Loading required package: ggplot2
  Loading required package: lattice
  Loading required package: Matrix
  Loaded glmnet 4.1-10
  Saving _problems/test_cram_simulation-57.R
  [ FAIL 6 | WARN 0 | SKIP 3 | PASS 127 ]
  
  ══ Skipped tests (3) ═══════════════════════════════════════════════════════════
  • Skipping this test temporarily (3): 'test_cram_learning.R:42:3',
    'test_cram_policy.R:41:3', 'test_cram_policy.R:156:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_cram_bandit_sim.R:15:3'): cram_bandit_sim runs and returns expected structure with  batch epsilon greedy ──
  Error in ``[.data.table`(res, , `:=`(probas, list(compute_probas(.SD, policy, policy_name, batch_size = batch_size))), by = .(agent, sim))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cramR::cram_bandit_sim(horizon, simulations, bandit, policy) at test_cram_bandit_sim.R:15:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_cram_bandit_sim.R:32:3'): cram_bandit_sim runs and returns expected structure with  batch = 1 epsilon greedy ──
  Error in ``[.data.table`(res, , `:=`(probas, list(compute_probas(.SD, policy, policy_name, batch_size = batch_size))), by = .(agent, sim))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cramR::cram_bandit_sim(horizon, simulations, bandit, policy) at test_cram_bandit_sim.R:32:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_cram_bandit_sim.R:49:3'): cram_bandit_sim runs and returns expected structure with ucb ──
  Error in ``[.data.table`(res, , `:=`(probas, list(compute_probas(.SD, policy, policy_name, batch_size = batch_size))), by = .(agent, sim))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cramR::cram_bandit_sim(horizon, simulations, bandit, policy) at test_cram_bandit_sim.R:49:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_cram_bandit_sim.R:67:3'): cram_bandit_sim runs and returns expected structure with thompson ──
  Error in ``[.data.table`(res, , `:=`(probas, list(compute_probas(.SD, policy, policy_name, batch_size = batch_size))), by = .(agent, sim))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cramR::cram_bandit_sim(horizon, simulations, bandit, policy) at test_cram_bandit_sim.R:67:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_cram_bandit_sim.R:85:3'): cram_bandit_sim returns finite numeric outputs ──
  Error in ``[.data.table`(res, , `:=`(probas, list(compute_probas(.SD, policy, policy_name, batch_size = batch_size))), by = .(agent, sim))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cramR::cram_bandit_sim(horizon, simulations, bandit, policy) at test_cram_bandit_sim.R:85:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_cram_simulation.R:49:3'): cram_simulation runs correctly and returns expected metrics ──
  Error in ``[.data.table`(big_X, , `:=`(D, dgp_D(.SD)), by = sim_id)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cramR::cram_simulation(...) at test_cram_simulation.R:49:3
   2.   ├─big_X[, `:=`(D, dgp_D(.SD)), by = sim_id]
   3.   └─data.table:::`[.data.table`(big_X, , `:=`(D, dgp_D(.SD)), by = sim_id)
  
  [ FAIL 6 | WARN 0 | SKIP 3 | PASS 127 ]
  Error:
  ! Test failures.
  Execution halted