Running ‘test-all.R’ [139s/163s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > suppressPackageStartupMessages(library("testthat"))
  > test_check("polle")
  Loading required package: polle
  Loading required package: SuperLearner
  Loading required package: nnls
  Loading required package: gam
  Loading required package: splines
  Loading required package: foreach
  Loaded gam 1.22-5
  
  Super Learner
  Version: 2.0-29
  Package created on 2024-02-06
  
  [ FAIL 49 | WARN 0 | SKIP 0 | PASS 332 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-fit_functions.R:2:5'): fit_functions handle multiple thresholds ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-fit_functions.R:2:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-g_empir.R:22:3'): g_empir predictions in a single stage setting ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(n = n, seed = 1) at test-g_empir.R:22:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-g_models.R:203:3'): g_rf runs: ─────────────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-g_models.R:203:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-g_models.R:224:3'): g_sl formats data correctly via the formula ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-g_models.R:224:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-g_models.R:247:3'): g_sl can find user-defined learners ────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-g_models.R:247:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-g_models.R:306:3'): g_glmnet formats data correctly via the formula ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-g_models.R:306:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-g_xgboost.R:3:3'): g_xgboost gives the same result as plain xgboost ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(1000, seed = 1) at test-g_xgboost.R:3:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-g_xgboost.R:35:3'): g_xgboost gives the same result as SL.xgboost ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(1000, seed = 1) at test-g_xgboost.R:35:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-g_xgboost.R:62:3'): g_xgboost tunes parameters ─────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(1000, seed = 1) at test-g_xgboost.R:62:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_data.R:17:3'): policy_data checks inputs ────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(10, seed = 1) at test-policy_data.R:17:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_data.R:623:3'): the action set is preserved when subsetting ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(10, seed = 1) at test-policy_data.R:623:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_data_functions.R:2:3'): get_history checks input ────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_data_functions.R:2:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_def.R:3:3'): policy_def checks the action set ───────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(2000, seed = 1) at test-policy_def.R:3:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_def.R:32:3'): policy_def handles static policies (single stage). ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(2000, seed = 1) at test-policy_def.R:32:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_def.R:109:3'): policy_def handles dynamic policies (single stage). ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(2000, seed = 1) at test-policy_def.R:109:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_eval.R:2:3'): policy_eval returns g and Q-function values. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_eval.R:2:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_eval.R:48:5'): policy_eval do not save g and Q-functions when
  save_g_functions = FALSE and save_q_functions = FALSE. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_eval.R:48:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_eval.R:73:3'): policy_eval checks inputs. ───────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_eval.R:73:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_eval.R:263:3'): policy_eval runs on a subset of the data with missing actions from the action set. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_eval.R:263:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_eval.R:351:3'): policy_eval with target = 'value' runs when cross-fitting. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_eval.R:351:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_eval.R:401:3'): policy_eval with target = 'value' agrees with targeted::lava ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_eval.R:401:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_eval_subgroup.R:2:5'): policy_eval with target = 'sub_effect' checks inputs. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_eval_subgroup.R:2:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_eval_subgroup.R:201:5'): policy_eval with target 'sub_effect' has the correct outputs: test1. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(100, seed = 1) at test-policy_eval_subgroup.R:201:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_g_functions.R:2:3'): policy_g_functions returns a policy which selects the most probable action. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(2000, seed = 1) at test-policy_g_functions.R:2:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn.R:11:3'): policy_learn checks input ───────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(n = 100) at test-policy_learn.R:11:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn.R:184:3'): policy_learn returns an error if type != 'blip' or type != 'ptl and threshold != 0. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn.R:184:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_blip.R:222:3'): policy_learn with type blip is persistent ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_blip.R:222:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_blip.R:261:3'): policy_learn with type blip passes the threshold argument in the single-stage case, ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_blip.R:261:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_blip.R:295:3'): get_policy.blip uses the threshold argument ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_blip.R:295:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_blip.R:396:3'): get_policy and get_policy_functions agree with type blip and a non-zero threshold argument, ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_blip.R:396:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_blip.R:444:3'): get_policy.blip() returns multiple policies when given multiple thresholds. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_blip.R:444:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_drql.R:3:3'): get_policy.drql returns a policy ────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_drql.R:3:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_earl.R:4:3'): get_policy.earl returns a policy ────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_earl.R:4:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_earl.R:38:3'): the polle implementation of earl agrees with direct application of DynTxRegime::earl in the single stage case. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_earl.R:38:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_earl.R:89:3'): the polle implementation is robust in respect to the action set. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_earl.R:89:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_earl.R:145:3'): earl handles missing arguments ────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_earl.R:145:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_owl.R:4:3'): the implementation of owl agrees with direct application of DTRlearn2::owl in the single stage case. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_owl.R:4:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_ptl.R:2:3'): get_policy.ptl returns a policy ──────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_ptl.R:2:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_ql.R:2:3'): get_policy.ql returns a policy ────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_ql.R:2:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-policy_learn_rwl.R:4:3'): the polle implementation of rwl agrees with direct application of DynTxRegime::rwl in the single stage case. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-policy_learn_rwl.R:4:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_glmnet.R:2:3'): predict.q_glmnet return a vector ─────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_glmnet.R:2:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_glmnet.R:25:5'): q_glmnet formats data correctly via the formula ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_glmnet.R:25:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_models.R:67:3'): q_rf formats data correctly via the formula ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_models.R:67:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_models.R:87:3'): q_sl formats data correctly via the formula ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_models.R:87:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_models.R:109:3'): q_sl can find user-defined learners ────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_models.R:109:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_models.R:147:3'): q_glm and q_sl(SL.library('SL.glm')) are (almost) equivalent ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_models.R:147:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_sl.R:3:3'): q_sl with discreteSL = TRUE picks the learner with the lowest cvrisk. ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_sl.R:3:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_xgboost.R:3:3'): q_xgboost tunes parameters ──────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_xgboost.R:3:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-q_xgboost.R:24:3'): q_xgboost gives the same result as plain xgboost ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─polle::sim_single_stage(200, seed = 1) at test-q_xgboost.R:24:3
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`distribution<-`(`*tmp*`, variable[i], ..., value = value[[i]])
    5.     └─lava:::`distribution<-.lvm`(`*tmp*`, variable[i], ..., value = value[[i]])
    6.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    7.       └─lava:::`addvar<-.lvm`(...)
    8.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    9.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
   10.           └─lava::procformula(object, value, ...)
   11.             ├─lava::`exogenous<-`(...)
   12.             └─lava:::`exogenous<-.lvm`(...)
   13.               └─lava::reindex(x)
   14.                 └─lava:::mat.lvm(x, res)
   15.                   └─base::cbind(idxM, pidxM)
  
  [ FAIL 49 | WARN 0 | SKIP 0 | PASS 332 ]
  Error: Test failures
  Execution halted