Running ‘testthat.R’ [65s/74s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(prioritylasso)
  > 
  > test_check("prioritylasso")
  ── 1. Failure: testing error messages (@test-cvmpl.R#45)  ──────────────────────
  `x` threw an error with unexpected message.
  Expected match: "Each predictor should be included in exactly one block."
  Actual message: "'NA' indices are not (yet?) supported for sparse Matrices"
  Backtrace:
    1. testthat::expect_that(...)
    8. prioritylasso::cvm_prioritylasso(...)
    9. prioritylasso::prioritylasso(...)
   10. glmnet::cv.glmnet(...)
   11. glmnet:::cv.glmnet.raw(...)
   13. glmnet:::buildPredmat.default(...)
   17. glmnet::predict.glmnet(...)
   19. nbeta[, lamlist$left, drop = FALSE]
   20. Matrix:::subCsp_cols(x, j, drop = drop)
   21. Matrix:::intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE)
  
  ── 2. Error: testing warning messages (@test-pl.R#168)  ────────────────────────
  'NA' indices are not (yet?) supported for sparse Matrices
  Backtrace:
    1. testthat::expect_that(...)
    8. prioritylasso::prioritylasso(...)
    9. glmnet::cv.glmnet(...)
   10. glmnet:::cv.glmnet.raw(...)
   12. glmnet:::buildPredmat.default(...)
   16. glmnet::predict.glmnet(...)
   18. nbeta[, lamlist$left, drop = FALSE]
   19. Matrix:::subCsp_cols(x, j, drop = drop)
   20. Matrix:::intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE)
  
  ── 3. Error: (unknown) (@test-predict.R#65)  ───────────────────────────────────
  'NA' indices are not (yet?) supported for sparse Matrices
  Backtrace:
    1. prioritylasso::prioritylasso(...)
    2. glmnet::cv.glmnet(...)
    3. glmnet:::cv.glmnet.raw(...)
    5. glmnet:::buildPredmat.default(...)
    9. glmnet::predict.glmnet(...)
   11. nbeta[, lamlist$left, drop = FALSE]
   12. Matrix:::subCsp_cols(x, j, drop = drop)
   13. Matrix:::intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 33 | SKIPPED: 0 | WARNINGS: 336 | FAILED: 3 ]
  1. Failure: testing error messages (@test-cvmpl.R#45) 
  2. Error: testing warning messages (@test-pl.R#168) 
  3. Error: (unknown) (@test-predict.R#65) 
  
  Error: testthat unit tests failed
  Execution halted