Running 'testthat.R' [6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > Sys.unsetenv("R_TESTS")
  > if (require(testthat, quietly = TRUE)) {
  +   require(stan4bart)
  +   test_check("stan4bart")
  + } else {
  +   cat("package 'testthat' not available; cannot run unit tests\n")
  + }
  Loading required package: stan4bart
  Loading required package: dbarts
  Saving _problems/test-01-continuous-19.R
  Saving _problems/test-02-binary-18.R
  Saving _problems/test-02-binary-89.R
  Saving _problems/test-03-na_action-29.R
  Saving _problems/test-03-na_action-51.R
  Saving _problems/test-04-factor_levels-25.R
  Saving _problems/test-05-rng-17.R
  Saving _problems/test-05-rng-35.R
  Saving _problems/test-06-no_ranef-19.R
  Saving _problems/test-06-no_ranef-26.R
  Saving _problems/test-07-extractedTrees-19.R
  [ FAIL 16 | WARN 0 | SKIP 2 | PASS 32 ]
  
  ══ Skipped tests (2) ═══════════════════════════════════════════════════════════
  • On CRAN (2): 'test-02-binary.R:33:3', 'test-02-binary.R:128:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-01-continuous.R:16:1'): (code run outside of `test_that()`) ────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-01-continuous.R:16:1
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-02-binary.R:15:3'): extract matches fitted in causal setting model ──
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-02-binary.R:15:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-02-binary.R:85:3'): predict matches supplied data ──────────────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-02-binary.R:85:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-03-na_action.R:24:3'): na.action = na.omit works correctly ─────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-03-na_action.R:24:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-03-na_action.R:46:3'): na.action = na.exclude works correctly ──
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-03-na_action.R:46:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-04-factor_levels.R:21:3'): model fits with empty factor levels ──
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-04-factor_levels.R:21:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-05-rng.R:13:3'): stan4bart with global seed and one thread is reproducible ──
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-05-rng.R:13:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-05-rng.R:30:3'): stan4bart with fixed seed is reproducible ─────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-05-rng.R:30:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-06-no_ranef.R:17:3'): fit issues warning if overparameterized ──
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-06-no_ranef.R:17:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─stan4bart::stan4bart(...)
    7.   └─stan4bart:::stan4bart_fit(...)
    8.     ├─base::eval(control_call)
    9.     │ └─base::eval(control_call)
   10.     └─dbarts::dbartsControl(...)
   11.       └─methods::new(...)
   12.         ├─methods::initialize(value, ...)
   13.         └─dbarts (local) initialize(value, ...)
   14.           ├─methods::callNextMethod()
   15.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   16.             └─methods::validObject(.Object)
   17.               ├─methods (local) anyStrings(validityMethod(object))
   18.               │ └─base::isTRUE(x)
   19.               └─dbarts (local) validityMethod(object)
   20.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-06-no_ranef.R:23:1'): (code run outside of `test_that()`) ──────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-06-no_ranef.R:23:1
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-07-extractedTrees.R:14:3'): stan4bart extracts trees correctly ──
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-07-extractedTrees.R:14:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-09-bartArgs.R:18:3'): bart args are set correctly ──────────────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-09-bartArgs.R:18:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-10-treatment.R:13:3'): works with logical treatment ────────────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-10-treatment.R:13:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-11-callback.R:44:3'): callback is passed sample correctly ──────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-11-callback.R:44:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-11-callback.R:104:3'): callback works with multiple threads ────
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-11-callback.R:104:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  ── Error ('test-11-callback.R:159:3'): callback works with multiple dimmed results ──
  Error in `parse(text = deparse(RNGkind)[-1L])`: <text>:1:22: unexpected ')'
  1:     binom.kind = NULL)
                           ^
  Backtrace:
       ▆
    1. └─stan4bart::stan4bart(...) at test-11-callback.R:159:3
    2.   └─stan4bart:::stan4bart_fit(...)
    3.     ├─base::eval(control_call)
    4.     │ └─base::eval(control_call)
    5.     └─dbarts::dbartsControl(...)
    6.       └─methods::new(...)
    7.         ├─methods::initialize(value, ...)
    8.         └─dbarts (local) initialize(value, ...)
    9.           ├─methods::callNextMethod()
   10.           └─methods (local) .nextMethod(.Object = .Object, ... = ...)
   11.             └─methods::validObject(.Object)
   12.               ├─methods (local) anyStrings(validityMethod(object))
   13.               │ └─base::isTRUE(x)
   14.               └─dbarts (local) validityMethod(object)
   15.                 └─base::parse(text = deparse(RNGkind)[-1L])
  
  [ FAIL 16 | WARN 0 | SKIP 2 | PASS 32 ]