Running ‘testthat.R’ [441s/299s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(CRE)
  > 
  > test_check("CRE")
  2023-04-15 09:14:22.873326 gimli 2605625 CRE cre INFO:  Starting rules discovery...
  2023-04-15 09:14:22.924951 gimli 2605625 CRE cre INFO:  Starting rules discovery...
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  2023-04-15 09:14:55.065972 gimli 2605625 CRE cre INFO:  Done with rules discovery. (WC: 32.136 seconds.)
  2023-04-15 09:14:55.086565 gimli 2605625 CRE cre INFO:  Starting inference...
  2023-04-15 09:14:55.449417 gimli 2605625 CRE cre INFO:  Starting rules discovery...
  2023-04-15 09:15:26.538722 gimli 2605625 CRE cre INFO:  Done with rules discovery. (WC: 31.084 seconds.)
  2023-04-15 09:15:26.542711 gimli 2605625 CRE cre INFO:  Starting inference...
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  2023-04-15 09:15:34.07244 gimli 2605625 CRE cre INFO:  Done with inference. (WC: 7.526 seconds .)
  2023-04-15 09:15:34.076365 gimli 2605625 CRE cre INFO:  Done with running CRE function!(WC: 38.629 seconds.)
  2023-04-15 09:15:34.080007 gimli 2605625 CRE cre INFO:  Done!
  2023-04-15 09:15:34.10535 gimli 2605625 CRE cre INFO:  Starting rules discovery...
  2023-04-15 09:15:39.942967 gimli 2605625 CRE cre INFO:  Done with rules discovery. (WC: 5.834 seconds.)
  2023-04-15 09:15:39.946238 gimli 2605625 CRE cre INFO:  Starting inference...
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  2023-04-15 09:15:47.339911 gimli 2605625 CRE cre INFO:  Done with inference. (WC: 7.390 seconds .)
  2023-04-15 09:15:47.343545 gimli 2605625 CRE cre INFO:  Done with running CRE function!(WC: 13.240 seconds.)
  2023-04-15 09:15:47.346579 gimli 2605625 CRE cre INFO:  Done!
  2023-04-15 09:15:47.361189 gimli 2605625 CRE cre INFO:  Starting rules discovery...
  2023-04-15 09:15:51.860759 gimli 2605625 CRE cre INFO:  Done with rules discovery. (WC: 4.496 seconds.)
  2023-04-15 09:15:51.864748 gimli 2605625 CRE cre INFO:  Starting inference...
  2023-04-15 09:15:57.302166 gimli 2605625 CRE cre INFO:  Done with inference. (WC: 5.434 seconds .)
  2023-04-15 09:15:57.305865 gimli 2605625 CRE cre INFO:  Done with running CRE function!(WC: 9.946 seconds.)
  2023-04-15 09:15:57.309074 gimli 2605625 CRE cre INFO:  Done!
  2023-04-15 09:15:57.323409 gimli 2605625 CRE cre INFO:  Starting rules discovery...
  2023-04-15 09:15:57.34294 gimli 2605625 CRE cre INFO:  Using the provided ITE estimations...
  2023-04-15 09:15:58.167088 gimli 2605625 CRE cre INFO:  Done with rules discovery. (WC: 0.824 seconds.)
  2023-04-15 09:15:58.170737 gimli 2605625 CRE cre INFO:  Starting inference...
  2023-04-15 09:15:58.174245 gimli 2605625 CRE cre INFO:  Skipped generating ITE.The provided ITE will be used.
  2023-04-15 09:15:58.201216 gimli 2605625 CRE cre INFO:  Done with inference. (WC: 0.026 seconds .)
  2023-04-15 09:15:58.204964 gimli 2605625 CRE cre INFO:  Done with running CRE function!(WC: 0.883 seconds.)
  2023-04-15 09:15:58.208411 gimli 2605625 CRE cre INFO:  Done!
  fitting treatment model via method 'bart'
  fitting response model via method 'bart'
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address 0x7f927a9f7990, 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: 7
  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 run_stabsel(fitter = fit_model, args.fitter = args.fitfun, n = n, : 'fitfun' must return a list with a named element called 'selected', and an optional second element called 'path'
  
  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