Running 'testthat.R' [66s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > 
  > library("testthat")
  > library("sentometrics")
  > 
  > test_check("sentometrics")
  
  Iteration: 1 from 9
  alphas run: 0
  Iteration: 2 from 9
  alphas run: 0
  Iteration: 3 from 9
  alphas run: 0
  Iteration: 4 from 9
  alphas run: 0
  Iteration: 5 from 9
  alphas run: 0
  Iteration: 6 from 9
  alphas run: 0
  Iteration: 7 from 9
  alphas run: 0
  Iteration: 8 from 9
  alphas run: 0
  Iteration: 9 from 9
  alphas run: 0
  -- ERROR (test_corpus_building.R:43:1): (code run outside of `test_that()`) ----
  Error: length(class) == 1L is not TRUE
  Backtrace:
      x
   1. \-tm::VCorpus(tm::DataframeSource(usnews)) test_corpus_building.R:43:0
   2.   \-utils::getS3method("pGetElem", class(x), TRUE)
   3.     \-base::stopifnot(is.character(class), length(class) == 1L)
  
  
  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.19341 
  A sento_measures object (24 textual sentiment time series, 7237 observations).
  
  alphas run: 0.2, 0.7
  alphas run: 0.2, 0.7
  alphas run: 0.2, 0.7
  Training model... Done. 
  Training model... Done. 
  Training model... Done. 
  alphas run: 0.2, 0.7
  Iteration: 1 from 16
  alphas run: 0, 0.4, 1
  Iteration: 2 from 16
  alphas run: 0, 0.4, 1
  Iteration: 3 from 16
  alphas run: 0, 0.4, 1
  Iteration: 4 from 16
  alphas run: 0, 0.4, 1
  Iteration: 5 from 16
  alphas run: 0, 0.4, 1
  Iteration: 6 from 16
  alphas run: 0, 0.4, 1
  Iteration: 7 from 16
  alphas run: 0, 0.4, 1
  Iteration: 8 from 16
  alphas run: 0, 0.4, 1
  Iteration: 9 from 16
  alphas run: 0, 0.4, 1
  Iteration: 10 from 16
  alphas run: 0, 0.4, 1
  Iteration: 11 from 16
  alphas run: 0, 0.4, 1
  Iteration: 12 from 16
  alphas run: 0, 0.4, 1
  Iteration: 13 from 16
  alphas run: 0, 0.4, 1
  Iteration: 14 from 16
  alphas run: 0, 0.4, 1
  Iteration: 15 from 16
  alphas run: 0, 0.4, 1
  Iteration: 16 from 16
  alphas run: 0, 0.4, 1
  Iteration: 1 from 16
  alphas run: 0, 0.4, 1
  Iteration: 2 from 16
  alphas run: 0, 0.4, 1
  Iteration: 3 from 16
  alphas run: 0, 0.4, 1
  Iteration: 4 from 16
  alphas run: 0, 0.4, 1
  Iteration: 5 from 16
  alphas run: 0, 0.4, 1
  Iteration: 6 from 16
  alphas run: 0, 0.4, 1
  Iteration: 7 from 16
  alphas run: 0, 0.4, 1
  Iteration: 8 from 16
  alphas run: 0, 0.4, 1
  Iteration: 9 from 16
  alphas run: 0, 0.4, 1
  Iteration: 10 from 16
  alphas run: 0, 0.4, 1
  Iteration: 11 from 16
  alphas run: 0, 0.4, 1
  Iteration: 12 from 16
  alphas run: 0, 0.4, 1
  Iteration: 13 from 16
  alphas run: 0, 0.4, 1
  Iteration: 14 from 16
  alphas run: 0, 0.4, 1
  Iteration: 15 from 16
  alphas run: 0, 0.4, 1
  Iteration: 16 from 16
  alphas run: 0, 0.4, 1
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: gaussian 
  Calibration: via Cp information criterion 
  Number of observations: 226 
  Optimal elastic net alpha parameter: 0.2 
  Optimal elastic net lambda parameter: 14.52 
   
  Non-zero coefficients 
  - - - - - - - - - - - - - - - - - - - - 
                        
  (Intercept) 105.249163
  x1            5.404962
  x2           -1.393848
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: binomial 
  Calibration: via cross-validation; ran through 5 samples of size 219, selection based on Accuracy metric 
  Number of observations: 233 
  Optimal elastic net alpha parameter: 0.2 
  Optimal elastic net lambda parameter: 100 
   
  Non-zero coefficients 
  - - - - - - - - - - - - - - - - - - - - 
                         
  (Intercept) -0.60098780
  x1          -0.05540991
  x2           0.24513464
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: multinomial 
  Calibration: via cross-validation; ran through 11 samples of size 213, selection based on Accuracy metric 
  Number of observations: 229 
  Optimal elastic net alpha parameter: 0.7 
  Optimal elastic net lambda parameter: 0.02 
   
  Number of non-zero coefficients per level (excl. intercept, incl. non-sentiment variables) 
  - - - - - - - - - - - - - - - - - - - - 
          
  below- 8
  below  6
  above  8
  above+ 6
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: gaussian 
  Calibration: via Cp information criterion 
  Sample size: 216 
  Total number of iterations/predictions: 16 
  Optimal average elastic net alpha parameter: 0.89 
  Optimal average elastic net lambda parameter: 3.63 
   
  Out-of-sample performance 
  - - - - - - - - - - - - - - - - - - - - 
   
  Mean directional accuracy: 60 % 
  Root mean squared prediction error: 60.25 
  Mean absolute deviation: 45.68
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: gaussian 
  Calibration: via Cp information criterion 
  Sample size: 216 
  Total number of iterations/predictions: 16 
  Optimal average elastic net alpha parameter: 0 
  Optimal average elastic net lambda parameter: 3889.32 
   
  Out-of-sample performance 
  - - - - - - - - - - - - - - - - - - - - 
   
  Mean directional accuracy: 26.67 % 
  Root mean squared prediction error: 44.32 
  Mean absolute deviation: 29.73
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: gaussian 
  Calibration: via Cp information criterion 
  Number of observations: 226 
  Optimal elastic net alpha parameter: 0.2 
  Optimal elastic net lambda parameter: 14.52 
   
  Non-zero coefficients 
  - - - - - - - - - - - - - - - - - - - - 
                        
  (Intercept) 105.249163
  x1            5.404962
  x2           -1.393848
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: binomial 
  Calibration: via cross-validation; ran through 5 samples of size 219, selection based on Accuracy metric 
  Number of observations: 233 
  Optimal elastic net alpha parameter: 0.2 
  Optimal elastic net lambda parameter: 100 
   
  Non-zero coefficients 
  - - - - - - - - - - - - - - - - - - - - 
                         
  (Intercept) -0.60098780
  x1          -0.05540991
  x2           0.24513464
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: multinomial 
  Calibration: via cross-validation; ran through 11 samples of size 213, selection based on Accuracy metric 
  Number of observations: 229 
  Optimal elastic net alpha parameter: 0.7 
  Optimal elastic net lambda parameter: 0.02 
   
  Number of non-zero coefficients per level (excl. intercept, incl. non-sentiment variables) 
  - - - - - - - - - - - - - - - - - - - - 
          
  below- 8
  below  6
  above  8
  above+ 6
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: gaussian 
  Calibration: via Cp information criterion 
  Sample size: 216 
  Total number of iterations/predictions: 16 
  Optimal average elastic net alpha parameter: 0.89 
  Optimal average elastic net lambda parameter: 3.63 
   
  Out-of-sample performance 
  - - - - - - - - - - - - - - - - - - - - 
   
  Mean directional accuracy: 60 % 
  Root mean squared prediction error: 60.25 
  Mean absolute deviation: 45.68
  A sento_model object. 
  A sento_model object. 
  A sento_model object. 
  A sento_modelIter object. 
  -- ERROR (test_sentiment_computation.R:27:1): (code run outside of `test_that()`
  Error: length(class) == 1L is not TRUE
  Backtrace:
      x
   1. \-tm::VCorpus(tm::DirSource(reuters)) test_sentiment_computation.R:27:0
   2.   \-utils::getS3method("pGetElem", class(x), TRUE)
   3.     \-base::stopifnot(is.character(class), length(class) == 1L)
  
  == testthat results  ===========================================================
  ERROR (test_corpus_building.R:43:1): (code run outside of `test_that()`)
  ERROR (test_sentiment_computation.R:27:1): (code run outside of `test_that()`)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 147 ]
  Error: Test failures
  Execution halted