* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/cramR.Rcheck’ * using R Under development (unstable) (2025-12-20 r89211) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) * running under: Fedora Linux 40 (Workstation Edition) * using session charset: UTF-8 * checking for file ‘cramR/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘cramR’ version ‘0.1.1’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘cramR’ can be installed ... [21s/21s] OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking whether startup messages can be suppressed ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [23s/23s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking examples with --run-donttest ... [21s/21s] ERROR Running examples in ‘cramR-Ex.R’ failed The error most likely occurred in: > ### Name: cram_bandit_sim > ### Title: Cram Bandit Simulation > ### Aliases: cram_bandit_sim > > ### ** Examples > > ## No test: > # Number of time steps > horizon <- 500L > > # Number of simulations > simulations <- 100L > > # Number of arms > k = 4 > > # Number of context features > d= 3 > > # Reward beta parameters of linear model (the outcome generation models, > # one for each arm, are linear with arm-specific parameters betas) > list_betas <- cramR::get_betas(simulations, d, k) > > # Define the contextual linear bandit, where sigma is the scale > # of the noise in the outcome linear model > bandit <- cramR::ContextualLinearBandit$new(k = k, + d = d, + list_betas = list_betas, + sigma = 0.3) > > # Define the policy object (choose between Contextual Epsilon Greedy, > # UCB Disjoint and Thompson Sampling) > policy <- cramR::BatchContextualEpsilonGreedyPolicy$new(epsilon=0.1, + batch_size=5) > # policy <- cramR::BatchLinUCBDisjointPolicyEpsilon$new(alpha=1.0,epsilon=0.1,batch_size=1) > # policy <- cramR::BatchContextualLinTSPolicy$new(v = 0.1, batch_size=1) > > > sim <- cram_bandit_sim(horizon, simulations, + bandit, policy, + alpha=0.05, do_parallel = FALSE) Simulation horizon: 500 Number of simulations: 101 Number of batches: 1 Starting main loop. Attaching package: ‘data.table’ The following object is masked from ‘package:base’: %notin% Finished main loop. Completed simulation in 0:00:14.786 Computing statistics. Error in `[.data.table`(res, , `:=`(probas, list(compute_probas(.SD, policy, : attempt access index 7/7 in VECTOR_ELT Calls: cram_bandit_sim -> [ -> [.data.table Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [21s/21s] [22s/21s] ERROR 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.026 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.623 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.657 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.708 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.318 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 * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [88s/82s] ERROR Error(s) in re-building vignettes: ... --- re-building ‘cram_bandit.Rmd’ using rmarkdown [WARNING] Deprecated: --highlight-style. Use --syntax-highlighting instead. --- finished re-building ‘cram_bandit.Rmd’ --- re-building ‘cram_bandit_helpers.Rmd’ using rmarkdown [WARNING] Deprecated: --highlight-style. Use --syntax-highlighting instead. --- finished re-building ‘cram_bandit_helpers.Rmd’ --- re-building ‘cram_bandit_simulation.Rmd’ using rmarkdown Quitting from cram_bandit_simulation.Rmd:76-106 [contextual-example] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error in `[.data.table`: ! attempt access index 7/7 in VECTOR_ELT --- Backtrace: ▆ 1. └─cramR::cram_bandit_sim(...) 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'cram_bandit_simulation.Rmd' failed with diagnostics: attempt access index 7/7 in VECTOR_ELT --- failed re-building ‘cram_bandit_simulation.Rmd’ --- re-building ‘cram_ml.Rmd’ using rmarkdown [WARNING] Deprecated: --highlight-style. Use --syntax-highlighting instead. --- finished re-building ‘cram_ml.Rmd’ --- re-building ‘cram_policy_part_1.Rmd’ using rmarkdown [WARNING] Deprecated: --highlight-style. Use --syntax-highlighting instead. --- finished re-building ‘cram_policy_part_1.Rmd’ --- re-building ‘cram_policy_part_2.Rmd’ using rmarkdown [WARNING] Deprecated: --highlight-style. Use --syntax-highlighting instead. --- finished re-building ‘cram_policy_part_2.Rmd’ --- re-building ‘cram_policy_simulation.Rmd’ using rmarkdown Quitting from cram_policy_simulation.Rmd:50-100 [unnamed-chunk-1] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error in `[.data.table`: ! attempt access index 4/4 in VECTOR_ELT --- Backtrace: ▆ 1. └─cramR::cram_simulation(...) 2. ├─big_X[, `:=`(D, dgp_D(.SD)), by = sim_id] 3. └─data.table:::`[.data.table`(big_X, , `:=`(D, dgp_D(.SD)), by = sim_id) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'cram_policy_simulation.Rmd' failed with diagnostics: attempt access index 4/4 in VECTOR_ELT --- failed re-building ‘cram_policy_simulation.Rmd’ --- re-building ‘quickstart.Rmd’ using rmarkdown [WARNING] Deprecated: --highlight-style. Use --syntax-highlighting instead. --- finished re-building ‘quickstart.Rmd’ SUMMARY: processing the following files failed: ‘cram_bandit_simulation.Rmd’ ‘cram_policy_simulation.Rmd’ Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 3 ERRORs See ‘/data/blackswan/ripley/R/packages/tests-devel/cramR.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 4:21.89, 234.36 + 32.55