Running ‘testthat.R’ [21s/28s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > 
  > library("testthat")
  > library("sentometrics")
  > 
  > test_check("sentometrics")
  Saving _problems/test_aggregation-27.R
  
  Saving _problems/test_attribution-23.R
  
  This sento_measures object contains 24 textual sentiment time series with 7237 observations each (daily).
  
  Following features are present: wsj wapo economy noneconomy 
  Following lexicons are used to calculate sentiment: HENRY_en LM_en 
  Following scheme is applied for aggregation within documents: counts 
  Following scheme is applied for aggregation across documents: proportional 
  Following schemes are applied for aggregation across time: linear exponential0.1 exponential0.6 
  
  Aggregate average statistics: 
      mean       sd      max      min meanCorr 
  -0.02282  0.18258  0.73352 -1.18603  0.19340 
  A sento_measures object (24 textual sentiment time series, 7237 observations).
  
  Saving _problems/test_modeling-22.R
  Saving _problems/test_sentiment_computation-145.R
  [ FAIL 4 | WARN 2 | SKIP 0 | PASS 121 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_aggregation.R:27:1'): (code run outside of `test_that()`) ──────
  Error in ``[.data.table`(dt, , `:=`("sentence_id", seq(.N)), by = id)`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─sentometrics::sento_measures(corpus, lex, ctr2) at test_aggregation.R:27:1
   2.   ├─sentometrics::compute_sentiment(...)
   3.   └─sentometrics:::compute_sentiment.sento_corpus(...)
   4.     └─sentometrics:::compute_sentiment_lexicons(...)
   5.       ├─dt[, `:=`("sentence_id", seq(.N)), by = id]
   6.       └─data.table:::`[.data.table`(...)
  ── Error ('test_attribution.R:23:1'): (code run outside of `test_that()`) ──────
  Error in ``[.data.table`(s, , `:=`(w, word_count/sum(word_count, na.rm = TRUE)), by = eval(by))`: attempt access index 10/10 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─sentometrics::sento_measures(corpus, lex, ctrA) at test_attribution.R:23:1
   2.   ├─stats::aggregate(sentiment, ctr)
   3.   └─sentometrics:::aggregate.sentiment(sentiment, ctr)
   4.     └─sentometrics:::aggregate_docs(x, by = by, how = howDocs, weightingParamDocs = weightingParamDocs)
   5.       └─sentometrics:::weights_across(...)
   6.         ├─s[, `:=`(w, word_count/sum(word_count, na.rm = TRUE)), by = eval(by)]
   7.         └─data.table:::`[.data.table`(...)
  ── Error ('test_modeling.R:22:1'): (code run outside of `test_that()`) ─────────
  Error in ``[.data.table`(s, , `:=`(w, word_count/sum(word_count, na.rm = TRUE)), by = eval(by))`: attempt access index 10/10 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─sentometrics::sento_measures(corpus, lex, ctrA) at test_modeling.R:22:1
   2.   ├─stats::aggregate(sentiment, ctr)
   3.   └─sentometrics:::aggregate.sentiment(sentiment, ctr)
   4.     └─sentometrics:::aggregate_docs(x, by = by, how = howDocs, weightingParamDocs = weightingParamDocs)
   5.       └─sentometrics:::weights_across(...)
   6.         ├─s[, `:=`(w, word_count/sum(word_count, na.rm = TRUE)), by = eval(by)]
   7.         └─data.table:::`[.data.table`(...)
  ── Error ('test_sentiment_computation.R:135:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt, , `:=`("sentence_id", seq(.N)), by = id)`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─sentometrics::compute_sentiment(...) at test_sentiment_computation.R:135:1
   2. └─sentometrics:::compute_sentiment.character(...)
   3.   └─sentometrics:::compute_sentiment_lexicons(...)
   4.     ├─dt[, `:=`("sentence_id", seq(.N)), by = id]
   5.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 4 | WARN 2 | SKIP 0 | PASS 121 ]
  Error:
  ! Test failures.
  Execution halted