Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > if(require(testthat)){
  +   test_check("supervisedPRIM")
  +   }
  Loading required package: testthat
  Loading required package: supervisedPRIM
  Loading required package: prim
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-supervisedPRIM.R:26:7): Testing the supervisedPRIM() and predict.supervisedPRIM() with factors ──
  `mp <- supervisedPRIM(x = training, y = ytrain, threshold.type = 1)` threw an error.
  Message: subscript out of bounds
  Class:   subscriptOutOfBoundsError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-supervisedPRIM.R:26:6
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─supervisedPRIM::supervisedPRIM(x = training, y = ytrain, threshold.type = 1)
   7.   └─prim::prim.box(...)
   8.     └─prim::prim.which.box(x = x, box.seq = prim.reg)
  ── Failure (test-supervisedPRIM.R:27:7): Testing the supervisedPRIM() and predict.supervisedPRIM() with factors ──
  `mn <- supervisedPRIM(x = training, y = ytrain, threshold.type = -1)` threw an error.
  Message: subscript out of bounds
  Class:   subscriptOutOfBoundsError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-supervisedPRIM.R:27:6
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─supervisedPRIM::supervisedPRIM(x = training, y = ytrain, threshold.type = -1)
   7.   └─prim::prim.box(...)
   8.     └─prim::prim.which.box(x = x, box.seq = prim.reg)
  ── Failure (test-supervisedPRIM.R:29:7): Testing the supervisedPRIM() and predict.supervisedPRIM() with factors ──
  `cpp <- predict(mp, newdata = testing)` threw an error.
  Message: object 'mp' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-supervisedPRIM.R:29:6
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─stats::predict(mp, newdata = testing)
  ── Failure (test-supervisedPRIM.R:30:7): Testing the supervisedPRIM() and predict.supervisedPRIM() with factors ──
  `cpn <- predict(mp, newdata = testing)` threw an error.
  Message: object 'mp' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-supervisedPRIM.R:30:6
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─stats::predict(mp, newdata = testing)
  ── Error (test-supervisedPRIM.R:32:7): Testing the supervisedPRIM() and predict.supervisedPRIM() with factors ──
  Error in `eval_bare(expr, quo_get_env(quo))`: object 'cpp' not found
  Backtrace:
      █
   1. └─testthat::expect_true(length(cpp) == length(ytest)) test-supervisedPRIM.R:32:6
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure (test-supervisedPRIM.R:60:6): Testing the supervisedPRIM() and predict.supervisedPRIM() with binary data ──
  `qf.prim <- supervisedPRIM(x = qf, y = qf.label)` threw an error.
  Message: subscript out of bounds
  Class:   subscriptOutOfBoundsError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-supervisedPRIM.R:60:5
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─supervisedPRIM::supervisedPRIM(x = qf, y = qf.label)
   7.   └─prim::prim.box(...)
   8.     └─prim::prim.which.box(x = x, box.seq = prim.reg)
  ── Failure (test-supervisedPRIM.R:61:6): Testing the supervisedPRIM() and predict.supervisedPRIM() with binary data ──
  `predictions <- predict(qf.prim, newdata = quasiflow[, 1:3])` threw an error.
  Message: object 'qf.prim' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-supervisedPRIM.R:61:5
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─stats::predict(qf.prim, newdata = quasiflow[, 1:3])
  ── Error (test-supervisedPRIM.R:62:6): Testing the supervisedPRIM() and predict.supervisedPRIM() with binary data ──
  Error in `predictions %in% c(0L, 1L)`: object 'predictions' not found
  Backtrace:
      █
   1. ├─testthat::expect_true(all(predictions %in% c(0L, 1L))) test-supervisedPRIM.R:62:5
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─predictions %in% c(0L, 1L)
  ── Error (test-supervisedPRIM.R:87:6): Testing on a large dataset ──────────────
  <subscriptOutOfBoundsError/error/condition>
  Error in `box.curr[1, j]`: subscript out of bounds
  Backtrace:
      █
   1. └─supervisedPRIM::supervisedPRIM(...) test-supervisedPRIM.R:87:5
   2.   └─prim::prim.box(...)
   3.     └─prim::prim.which.box(x = x, box.seq = prim.reg)
  
  [ FAIL 9 | WARN 0 | SKIP 0 | PASS 2 ]
  Error: Test failures
  Execution halted