Running 'testthat.R' [99s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library("testthat")
  > 
  > # Keep the test suite within CRAN's two-core limit.
  > data.table::setDTthreads(2)
  > library("sentopics")
  > 
  > if (Sys.getenv("R_COVR") != "true") {
  +   test_check("sentopics")
  + } else {
  +   test_check("sentopics", reporter = default_reporter())
  +   # test_check("sentopics", reporter = LocationReporter)
  + }
  Saving _problems/test-coherence-5.R
  Saving _problems/test-conversions-13.R
  Saving _problems/test-conversions-84.R
  Saving _problems/test-conversions-123.R
  Saving _problems/test-conversions-194.R
  Saving _problems/test-generics-5.R
  0%   10   20   30   40   50   60   70   80   90   100%
  [----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  0%   10   20   30   40   50   60   70   80   90   100%
  [----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  0%   10   20   30   40   50   60   70   80   90   100%
  [----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  0%   10   20   30   40   50   60   70   80   90   100%
  [----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  Saving _problems/test-others-11.R
  [ FAIL 9 | WARN 11 | SKIP 1 | PASS 264 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-parallel_chains.R:97:5'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-coherence.R:5:1'): (code run outside of `test_that()`) ─────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'colSums': lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
       ▆
    1. ├─quanteda::dfm_trim(dfm, min_termfreq = 2) at test-coherence.R:5:1
    2. ├─quanteda:::dfm_trim.dfm(dfm, min_termfreq = 2)
    3. │ ├─quanteda:::trim_features(...)
    4. │ ├─quanteda::docfreq(x)
    5. │ └─quanteda:::docfreq.dfm(x)
    6. │   ├─methods (local) colSums(x > threshold)
    7. │   ├─x > threshold
    8. │   └─x > threshold
    9. │     ├─methods::as(callGeneric(as(e1, "CsparseMatrix"), e2), "CsparseMatrix")
   10. │     │ └─methods:::.class1(object)
   11. │     ├─methods::callGeneric(as(e1, "CsparseMatrix"), e2)
   12. │     │ └─base::eval(call, parent.frame())
   13. │     │   └─base::eval(call, parent.frame())
   14. │     ├─as(e1, "CsparseMatrix") > e2
   15. │     └─as(e1, "CsparseMatrix") > e2
   16. └─base::.handleSimpleError(...)
   17.   └─base (local) h(simpleError(msg, call))
  ── Error ('test-conversions.R:12:3'): from STM ─────────────────────────────────
  Error in `makeTopMatrix(prevalence, data)`: lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
      ▆
   1. └─stm::stm(...) at test-conversions.R:12:3
   2.   └─stm (local) makeTopMatrix(prevalence, data)
  ── Error ('test-conversions.R:84:3'): from topicmodels ─────────────────────────
  Error in `as.dfm(sparseMatrix(i = x$i, j = x$j, x = x$v, dims = dim(x), dimnames = list(docs = rownames(x), features = colnames(x))))`: lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
      ▆
   1. ├─sentopics::as.LDA(lda, docs = AssociatedPress) at test-conversions.R:84:3
   2. └─sentopics:::as.LDA.LDA_Gibbs(lda, docs = AssociatedPress)
   3.   ├─quanteda::as.tokens(quanteda::as.dfm(docs))
   4.   ├─quanteda::as.dfm(docs)
   5.   └─quanteda:::as.dfm.DocumentTermMatrix(docs)
   6.     └─quanteda::as.dfm(...)
  ── Error ('test-conversions.R:122:3'): from seededlda ──────────────────────────
  Error in `lda(x, k, label, max_iter, auto_iter, alpha, beta, gamma, adjust_alpha, NULL, words, batch_size, verbose)`: lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
      ▆
   1. ├─seededlda::textmodel_lda(...) at test-conversions.R:122:3
   2. └─seededlda:::textmodel_lda.dfm(...)
   3.   └─seededlda:::lda(...)
  ── Error ('test-conversions.R:194:3'): from keyATM ─────────────────────────────
  Error in `as(x, "Matrix")[, j, drop = FALSE]`: lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
      ▆
   1. ├─sentopics::as.LDA(out, keyATM_docs) at test-conversions.R:194:3
   2. └─sentopics:::as.LDA.keyATM_output(out, keyATM_docs)
   3.   ├─dfm[, vocabulary$vocabulary$word]
   4.   └─dfm[, vocabulary$vocabulary$word]
   5.     ├─as(x, "Matrix")[, j, drop = FALSE]
   6.     └─as(x, "Matrix")[, j, drop = FALSE]
  ── Error ('test-generics.R:5:1'): (code run outside of `test_that()`) ──────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'colSums': lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
       ▆
    1. ├─quanteda::dfm_trim(dfm, min_termfreq = 2) at test-generics.R:5:1
    2. ├─quanteda:::dfm_trim.dfm(dfm, min_termfreq = 2)
    3. │ ├─quanteda:::trim_features(...)
    4. │ ├─quanteda::docfreq(x)
    5. │ └─quanteda:::docfreq.dfm(x)
    6. │   ├─methods (local) colSums(x > threshold)
    7. │   ├─x > threshold
    8. │   └─x > threshold
    9. │     ├─methods::as(callGeneric(as(e1, "CsparseMatrix"), e2), "CsparseMatrix")
   10. │     │ └─methods:::.class1(object)
   11. │     ├─methods::callGeneric(as(e1, "CsparseMatrix"), e2)
   12. │     │ └─base::eval(call, parent.frame())
   13. │     │   └─base::eval(call, parent.frame())
   14. │     ├─as(e1, "CsparseMatrix") > e2
   15. │     └─as(e1, "CsparseMatrix") > e2
   16. └─base::.handleSimpleError(...)
   17.   └─base (local) h(simpleError(msg, call))
  ── Error ('test-others.R:11:3'): compute_PicaultRenault_scores works ───────────
  Error in `as(x, "Matrix")[, j, drop = FALSE]`: lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
      ▆
   1. └─sentopics::compute_PicaultRenault_scores(docs) at test-others.R:11:3
   2.   ├─dfm[, intersect(colnames(dfm), PicaultRenault$keyword)]
   3.   └─dfm[, intersect(colnames(dfm), PicaultRenault$keyword)]
   4.     ├─as(x, "Matrix")[, j, drop = FALSE]
   5.     └─as(x, "Matrix")[, j, drop = FALSE]
  ── Error ('test-parallel_chains.R:131:3'): scores & distances works ────────────
  Error in `as(x, "Matrix")[, j, drop = FALSE]`: lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test-parallel_chains.R:131:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─sentopics::chainsScores(...)
   10.   └─sentopics:::computeNPMI(x$tokens, window)
   11.     ├─sentopics:::NPMI(as.matrix(computeFcm(x, window), epsilon = 0))
   12.     ├─base::as.matrix(computeFcm(x, window), epsilon = 0)
   13.     └─sentopics:::computeFcm(x, window)
   14.       ├─collocationsV[, quanteda::types(x)]
   15.       └─collocationsV[, quanteda::types(x)]
   16.         ├─as(x, "Matrix")[, j, drop = FALSE]
   17.         └─as(x, "Matrix")[, j, drop = FALSE]
  ── Error ('test-utils.R:22:3'): as.tokens.dfm works ────────────────────────────
  Error in ``dimnames<-`(`*tmp*`, value = dn)`: lazy-load database 'D:/temp/2026_08_18_01_50_00_4374/RtmpAXHTKp/RLIBS_a2b475451a33/Matrix/R/Matrix.rdb' is corrupt
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(LDA <- LDA(dfm)) at test-utils.R:22:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─sentopics::LDA(dfm)
   10.   ├─sentopics::as.LDA(...)
   11.   └─sentopics::sentopicmodel(...)
   12.     ├─quanteda::as.tokens(x)
   13.     └─sentopics:::as.tokens.dfm(x)
   14.       └─base::`colnames<-`(`*tmp*`, value = seq_len(ncol(x)))
   15.         ├─methods (local) `dimnames<-`(`*tmp*`, value = dn)
   16.         └─Matrix (local) `dimnames<-`(`*tmp*`, value = dn)
  
  [ FAIL 9 | WARN 11 | SKIP 1 | PASS 264 ]
  Error:
  ! Test failures.
  Execution halted