Running ‘testthat.R’ [328s/324s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(CRE)
  > 
  > test_check("CRE")
  2023-04-14 15:23:29.212737 gimli2 3837604 CRE cre INFO:  Starting rules discovery...
  2023-04-14 15:23:29.28491 gimli2 3837604 CRE cre INFO:  Starting rules discovery...
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  2023-04-14 15:24:04.284201 gimli2 3837604 CRE cre INFO:  Done with rules discovery. (WC: 34.996 seconds.)
  2023-04-14 15:24:04.31386 gimli2 3837604 CRE cre INFO:  Starting inference...
  2023-04-14 15:24:04.834597 gimli2 3837604 CRE cre INFO:  Starting rules discovery...
  2023-04-14 15:24:38.896731 gimli2 3837604 CRE cre INFO:  Done with rules discovery. (WC: 34.059 seconds.)
  2023-04-14 15:24:38.89995 gimli2 3837604 CRE cre INFO:  Starting inference...
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  2023-04-14 15:24:47.696593 gimli2 3837604 CRE cre INFO:  Done with inference. (WC: 8.794 seconds .)
  2023-04-14 15:24:47.699736 gimli2 3837604 CRE cre INFO:  Done with running CRE function!(WC: 42.882 seconds.)
  2023-04-14 15:24:47.702526 gimli2 3837604 CRE cre INFO:  Done!
  2023-04-14 15:24:47.758847 gimli2 3837604 CRE cre INFO:  Starting rules discovery...
  2023-04-14 15:24:53.383935 gimli2 3837604 CRE cre INFO:  Done with rules discovery. (WC: 5.622 seconds.)
  2023-04-14 15:24:53.38653 gimli2 3837604 CRE cre INFO:  Starting inference...
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  2023-04-14 15:25:00.599586 gimli2 3837604 CRE cre INFO:  Done with inference. (WC: 7.209 seconds .)
  2023-04-14 15:25:00.602387 gimli2 3837604 CRE cre INFO:  Done with running CRE function!(WC: 12.845 seconds.)
  2023-04-14 15:25:00.60507 gimli2 3837604 CRE cre INFO:  Done!
  2023-04-14 15:25:00.631402 gimli2 3837604 CRE cre INFO:  Starting rules discovery...
  2023-04-14 15:25:06.97743 gimli2 3837604 CRE cre INFO:  Done with rules discovery. (WC: 6.343 seconds.)
  2023-04-14 15:25:06.980258 gimli2 3837604 CRE cre INFO:  Starting inference...
  2023-04-14 15:25:13.200883 gimli2 3837604 CRE cre INFO:  Done with inference. (WC: 6.218 seconds .)
  2023-04-14 15:25:13.203832 gimli2 3837604 CRE cre INFO:  Done with running CRE function!(WC: 12.573 seconds.)
  2023-04-14 15:25:13.206384 gimli2 3837604 CRE cre INFO:  Done!
  2023-04-14 15:25:13.218209 gimli2 3837604 CRE cre INFO:  Starting rules discovery...
  2023-04-14 15:25:13.22115 gimli2 3837604 CRE cre INFO:  Using the provided ITE estimations...
  2023-04-14 15:25:13.741786 gimli2 3837604 CRE cre INFO:  Done with rules discovery. (WC: 0.520 seconds.)
  2023-04-14 15:25:13.744462 gimli2 3837604 CRE cre INFO:  Starting inference...
  2023-04-14 15:25:13.746851 gimli2 3837604 CRE cre INFO:  Skipped generating ITE.The provided ITE will be used.
  2023-04-14 15:25:13.767443 gimli2 3837604 CRE cre INFO:  Done with inference. (WC: 0.020 seconds .)
  2023-04-14 15:25:13.770094 gimli2 3837604 CRE cre INFO:  Done with running CRE function!(WC: 0.554 seconds.)
  2023-04-14 15:25:13.772491 gimli2 3837604 CRE cre INFO:  Done!
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f2b47b6a990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  Error in setinfo.xgb.DMatrix(dmat, names(p), p[[1]]) : 
    The length of labels must equal to the number of rows in the input data
  Error in setinfo.xgb.DMatrix(dmat, names(p), p[[1]]) : 
    The length of labels must equal to the number of rows in the input data
  Error in setinfo.xgb.DMatrix(dmat, names(p), p[[1]]) : 
    The length of labels must equal to the number of rows in the input data
  Error in setinfo.xgb.DMatrix(dmat, names(p), p[[1]]) : 
    The length of labels must equal to the number of rows in the input data
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  Using 11 control variables.
  Using 10 potential effect moderators.
  
  Beginning MCMC:
  iteration: 0 sigma: 1
  iteration: 100 sigma: 0.939757
  iteration: 200 sigma: 0.790513
  iteration: 300 sigma: 0.861269
  iteration: 400 sigma: 0.801012
  iteration: 500 sigma: 0.835339
  iteration: 600 sigma: 0.782724
  iteration: 700 sigma: 0.841266
  iteration: 800 sigma: 0.809863
  iteration: 900 sigma: 0.866562
  time for loop: 8
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  Using 11 control variables.
  Using 10 potential effect moderators.
  
  Beginning MCMC:
  iteration: 0 sigma: 1
  iteration: 100 sigma: 0.833804
  iteration: 200 sigma: 0.818013
  iteration: 300 sigma: 0.773024
  iteration: 400 sigma: 0.817209
  iteration: 500 sigma: 0.827118
  iteration: 600 sigma: 0.795232
  iteration: 700 sigma: 0.798065
  iteration: 800 sigma: 0.920424
  iteration: 900 sigma: 0.808557
  time for loop: 10
  Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : 
    contrasts can be applied only to factors with 2 or more levels
  Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : 
    contrasts can be applied only to factors with 2 or more levels
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 243 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-discover_rules.R:53:3'): discover_rules works as expected! ─────
  Error in `value[[3L]](cond)`: Combination of `cutoff` and `pfer` not allowed. 
  Try to decrease the `cutoff` or increase the `pfer`. 
  See Stability Selection documentation for further details. 
  
  Original Error message: Error in max(steps): invalid 'type' (list) of argument
  
  Backtrace:
      ▆
   1. └─CRE:::discover_rules(X, ite, method_params, hyper_params) at test-discover_rules.R:53:2
   2.   └─CRE:::select_rules(...)
   3.     └─base::tryCatch(...)
   4.       └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   5.         └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   6.           └─value[[3L]](cond)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 243 ]
  Error: Test failures
  Execution halted