Running 'testthat.R' [38s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > 
  > library(testthat)
  > library(contextual)
  > 
  > test_check("contextual")
  -- 1. Error: PropensityWeightingBandit (@test_bandits.R#611)  ------------------
  task 1 failed - "could not find function "isFALSE""
  1: simulation$run() at testthat/test_bandits.R:611
  2: foreach::foreach(sims_agent_list = sa_iterator, i = iterators::icount(), .inorder = TRUE, 
         .export = c("History", "Formula"), .noexport = c("sims_and_agents_list", "internal_history", 
             "sa_iterator"), .packages = par_packages) %fun% {
         index <- 1L
         sim_agent_counter <- 0
         sim_agent_total <- length(sims_agent_list)
         multiplier <- 1
         for (sim_agent_index in sims_agent_list) {
             sim_agent <- agents[[sim_agent_index$agent_index]]
             if (isTRUE(sim_agent$bandit$arm_multiply)) 
                 if (multiplier < sim_agent$bandit$k) 
                     multiplier <- sim_agent$bandit$k
         }
         allocate_space <- floor((horizon * sim_agent_total * multiplier)/save_interval) + 
             sim_agent_total
         local_history <- History$new(allocate_space, save_context, save_theta)
         for (sim_agent_index in sims_agent_list) {
             sim_agent <- agents[[sim_agent_index$agent_index]]$clone(deep = TRUE)
             sim_agent$sim_index <- sim_agent_index$sim_index
             sim_agent$agent_index <- sim_agent_index$agent_index
             sim_agent_counter <- sim_agent_counter + 1
             if (isTRUE(progress_file)) {
                 sim_agent$progress_file <- TRUE
                 sim_agent$log_interval <- log_interval
                 cat(paste0("[", format(Sys.time(), format = "%H:%M:%OS6"), "] ", "        0 > init - ", 
                     sprintf("%-20s", sim_agent$name), " worker ", i, " at sim ", sim_agent_counter, 
                     " of ", sim_agent_total, "\n"), file = "workers_progress.log", append = TRUE)
             }
             simulation_index <- sim_agent$sim_index
             agent_name <- sim_agent$name
             local_curent_seed <- simulation_index + set_seed * 42
             set.seed(local_curent_seed)
             sim_agent$bandit$post_initialization()
             if (isTRUE(sim_agent$bandit$arm_multiply)) 
                 horizon_loop <- horizon * sim_agent$bandit$k
             else horizon_loop <- horizon
             set.seed(local_curent_seed + 1e+06)
             sim_agent$bandit$generate_bandit_data(n = horizon_loop)
             if (isTRUE(t_over_sims)) 
                 sim_agent$set_t(as.integer((simulation_index - 1L) * horizon_loop))
             step <- list()
             for (t in 1L:horizon_loop) {
                 step <- sim_agent$do_step()
                 if (!is.null(step[[3]]) && ((step[[5]] == 1) || (step[[5]]%%save_interval == 
                     0))) {
                     local_history$insert(index, step[[5]], step[[1]][["k"]], step[[1]][["d"]], 
                       step[[2]], step[[3]], agent_name, simulation_index, if (save_context) 
                         step[[1]][["X"]]
                       else NA, if (save_theta) 
                         step[[4]]
                       else NA)
                     index <- index + 1L
                 }
             }
         }
         sim_agent$bandit$final()
         local_history$data[t != 0]
     }
  3: e$fun(obj, substitute(ex), parent.frame(), e$data)
  
  == testthat results  ===========================================================
  OK: 134 SKIPPED: 1 FAILED: 1
  1. Error: PropensityWeightingBandit (@test_bandits.R#611) 
  
  Error: testthat unit tests failed
  Execution halted