Running ‘testthat.R’ [24s/62s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(xrf)
  > 
  > test_check("xrf")
  Saving _problems/test_model-39.R
  Saving _problems/test_model-48.R
  Saving _problems/test_model-56.R
  [ FAIL 3 | WARN 44 | SKIP 0 | PASS 12 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_model.R:38:3'): model from dense design matrix has expected fields ──
  Error in `process.y.margin.and.objective(y, base_margin, objective, params)`: Got numeric 'y' - supported objectives for this data are: reg:squarederror, reg:squaredlogerror, reg:logistic, reg:pseudohubererror, reg:absoluteerror, reg:quantileerror, count:poisson, reg:gamma, reg:tweedie. Was passed: binary:logistic
  Backtrace:
      ▆
   1. ├─xrf::xrf(...) at test_model.R:38:3
   2. └─xrf:::xrf.formula(...)
   3.   └─xgboost::xgboost(...)
   4.     └─xgboost:::process.y.margin.and.objective(...)
  ── Error ('test_model.R:47:3'): model from sparse design matrix has expected fields ──
  Error in `process.y.margin.and.objective(y, base_margin, objective, params)`: Got numeric 'y' - supported objectives for this data are: reg:squarederror, reg:squaredlogerror, reg:logistic, reg:pseudohubererror, reg:absoluteerror, reg:quantileerror, count:poisson, reg:gamma, reg:tweedie. Was passed: binary:logistic
  Backtrace:
      ▆
   1. ├─xrf::xrf(...) at test_model.R:47:3
   2. └─xrf:::xrf.formula(...)
   3.   └─xgboost::xgboost(...)
   4.     └─xgboost:::process.y.margin.and.objective(...)
  ── Error ('test_model.R:54:3'): model predicts binary outcome ──────────────────
  Error in `process.y.margin.and.objective(y, base_margin, objective, params)`: Got numeric 'y' - supported objectives for this data are: reg:squarederror, reg:squaredlogerror, reg:logistic, reg:pseudohubererror, reg:absoluteerror, reg:quantileerror, count:poisson, reg:gamma, reg:tweedie. Was passed: binary:logistic
  Backtrace:
      ▆
   1. ├─xrf::xrf(...) at test_model.R:54:3
   2. └─xrf:::xrf.formula(...)
   3.   └─xgboost::xgboost(...)
   4.     └─xgboost:::process.y.margin.and.objective(...)
  
  [ FAIL 3 | WARN 44 | SKIP 0 | PASS 12 ]
  Error:
  ! Test failures.
  Execution halted