Running ‘testthat.R’ [9s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(text2sdg)
  > 
  > test_check("text2sdg")
  
  Running ElsevierSaving _problems/test-detect_sdg_systems-24.R
  [ FAIL 1 | WARN 0 | SKIP 15 | PASS 11 ]
  
  ══ Skipped tests (15) ══════════════════════════════════════════════════════════
  • On CRAN (15): 'test-crosstab_sdg.R:3:3', 'test-crosstab_sdg.R:19:3',
    'test-crosstab_sdg.R:26:3', 'test-crosstab_sdg.R:34:3',
    'test-crosstab_sdg.R:42:3', 'test-crosstab_sdg.R:51:3',
    'test-crosstab_sdg.R:60:3', 'test-crosstab_sdg.R:67:3',
    'test-crosstab_sdg.R:75:3', 'test-detect_any.R:59:3',
    'test-detect_any.R:83:3', 'test-detect_any.R:103:3',
    'test-detect_sdg_systems.R:39:3', 'test-ensemble.R:15:3',
    'test-ensemble.R:37:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-detect_sdg_systems.R:24:3'): detect_sdg_systems returns a tibble ──
  Error in ``[.data.table`(ql, , `:=`(n, add_n(t)), by = "i")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─text2sdg::detect_sdg_systems(test_text, system = "Elsevier") at test-detect_sdg_systems.R:24:3
    2. │ └─text2sdg:::detect_elsevier(corpus, sdgs)
    3. │   └─text2sdg:::search_corpus(corpus, elsevier_queries$query)
    4. │     ├─... %>% tibble::as_tibble()
    5. │     └─corpustools::search_features(corpus, queries, ...)
    6. │       └─corpustools:::get_dict_results(...)
    7. │         └─corpustools:::dictionary_lookup(...)
    8. │           └─corpustools:::dictionary_lookup_tokens(...)
    9. │             └─corpustools:::dictionary_lookup_tokens2(...)
   10. │               └─corpustools:::collapse_dict(...)
   11. │                 └─corpustools:::expand_wildcards(sn, feature_levels)
   12. │                   ├─ql[, `:=`(n, add_n(t)), by = "i"]
   13. │                   └─data.table:::`[.data.table`(ql, , `:=`(n, add_n(t)), by = "i")
   14. └─tibble::as_tibble(.)
  
  [ FAIL 1 | WARN 0 | SKIP 15 | PASS 11 ]
  Error:
  ! Test failures.
  Execution halted