Running 'testthat.R' [61s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > 
  > library("testthat")
  > library("sentometrics")
  Loading required package: data.table
  > 
  > test_check("sentometrics")
  iteration: 1 from 6
  alphas run: 0.2, 0.7
  iteration: 2 from 6
  alphas run: 0.2, 0.7
  iteration: 3 from 6
  alphas run: 0.2, 0.7
  iteration: 4 from 6
  alphas run: 0.2, 0.7
  iteration: 5 from 6
  alphas run: 0.2, 0.7
  iteration: 6 from 6
  alphas run: 0.2, 0.7
  -- 1. Error: (unknown) (@test_methods_sentomeasures.R#33)  ---------------------
  length of 'center' must equal the number of columns of 'x'
  1: scale(sentMeas, center = as.vector(sentMeas$stats["mean", ]), scale = as.vector(sentMeas$stats["sd", 
         ])) at testthat/test_methods_sentomeasures.R:33
  2: scale.sentomeasures(sentMeas, center = as.vector(sentMeas$stats["mean", ]), scale = as.vector(sentMeas$stats["sd", 
         ]))
  3: scale(measures, center, scale)
  4: scale.default(measures, center, scale)
  5: stop("length of 'center' must equal the number of columns of 'x'")
  
  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.7 
  Optimal elastic net lambda parameter: 0.11 
   
  Non-zero coefficients 
  - - - - - - - - - - - - - - - - - - - - 
                                            
  (Intercept)                      96.374913
  GI_en--economy--almon1         1445.453895
  GI_en--noneconomy--almon1     -2747.069668
  LM_en--wsj--almon1            -3768.057854
  LM_en--wapo--almon1            5157.542206
  LM_en--economy--almon1         1510.211737
  GI_en--wsj--almon1_inv         -242.569022
  GI_en--wapo--almon1_inv        1407.865521
  LM_en--wsj--almon1_inv          170.561023
  LM_en--wapo--almon1_inv       -1793.703655
  LM_en--economy--almon1_inv     1692.843622
  GI_en--economy--almon2          214.657189
  GI_en--noneconomy--almon2      -801.010995
  LM_en--economy--almon2         1508.768623
  LM_en--economy--almon2_inv      409.196576
  GI_en--wsj--almon3             -103.845099
  GI_en--noneconomy--almon3      -503.717641
  LM_en--wsj--almon3            -2018.717049
  LM_en--wapo--almon3             423.943606
  LM_en--economy--almon3        -4288.401757
  GI_en--wsj--almon3_inv          629.186139
  GI_en--economy--almon3_inv    -3049.207127
  GI_en--noneconomy--almon3_inv  3207.076749
  LM_en--wsj--almon3_inv         4705.304396
  LM_en--wapo--almon3_inv       -4942.936268
  x1                               -2.975119
  x2                                1.495385
  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.65335663
  x1           0.27680048
  x2           0.02006744
  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.2 
  Optimal elastic net lambda parameter: 0.15 
   
  Number of non-zero coefficients per level (excl. intercept, incl. non-sentiment variables) 
  - - - - - - - - - - - - - - - - - - - - 
           
  below-  7
  below  10
  above   7
  above+  5
  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: 1 
  Optimal average elastic net lambda parameter: 49.91 
   
  Out-of-sample performance 
  - - - - - - - - - - - - - - - - - - - - 
   
  Mean directional accuracy: 33.33 % 
  Root mean squared prediction error: 70 
  Mean absolute deviation: 55.36
  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: 4692.05 
   
  Out-of-sample performance 
  - - - - - - - - - - - - - - - - - - - - 
   
  Mean directional accuracy: 53.33 % 
  Root mean squared prediction error: 49.7 
  Mean absolute deviation: 36.93
  Model specification 
  - - - - - - - - - - - - - - - - - - - - 
   
  Model type: gaussian 
  Calibration: via Cp information criterion 
  Number of observations: 226 
  Optimal elastic net alpha parameter: 0.7 
  Optimal elastic net lambda parameter: 0.11 
   
  Non-zero coefficients 
  - - - - - - - - - - - - - - - - - - - - 
                                            
  (Intercept)                      96.374913
  GI_en--economy--almon1         1445.453895
  GI_en--noneconomy--almon1     -2747.069668
  LM_en--wsj--almon1            -3768.057854
  LM_en--wapo--almon1            5157.542206
  LM_en--economy--almon1         1510.211737
  GI_en--wsj--almon1_inv         -242.569022
  GI_en--wapo--almon1_inv        1407.865521
  LM_en--wsj--almon1_inv          170.561023
  LM_en--wapo--almon1_inv       -1793.703655
  LM_en--economy--almon1_inv     1692.843622
  GI_en--economy--almon2          214.657189
  GI_en--noneconomy--almon2      -801.010995
  LM_en--economy--almon2         1508.768623
  LM_en--economy--almon2_inv      409.196576
  GI_en--wsj--almon3             -103.845099
  GI_en--noneconomy--almon3      -503.717641
  LM_en--wsj--almon3            -2018.717049
  LM_en--wapo--almon3             423.943606
  LM_en--economy--almon3        -4288.401757
  GI_en--wsj--almon3_inv          629.186139
  GI_en--economy--almon3_inv    -3049.207127
  GI_en--noneconomy--almon3_inv  3207.076749
  LM_en--wsj--almon3_inv         4705.304396
  LM_en--wapo--almon3_inv       -4942.936268
  x1                               -2.975119
  x2                                1.495385
  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.65335663
  x1           0.27680048
  x2           0.02006744
  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.2 
  Optimal elastic net lambda parameter: 0.15 
   
  Number of non-zero coefficients per level (excl. intercept, incl. non-sentiment variables) 
  - - - - - - - - - - - - - - - - - - - - 
           
  below-  7
  below  10
  above   7
  above+  5
  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: 1 
  Optimal average elastic net lambda parameter: 49.91 
   
  Out-of-sample performance 
  - - - - - - - - - - - - - - - - - - - - 
   
  Mean directional accuracy: 33.33 % 
  Root mean squared prediction error: 70 
  Mean absolute deviation: 55.36
  A sentomodel object.A sentomodel object.A sentomodel object.A sentomodeliter object.== testthat results  ===========================================================
  OK: 135 SKIPPED: 0 FAILED: 1
  1. Error: (unknown) (@test_methods_sentomeasures.R#33) 
  
  Error: testthat unit tests failed
  Execution halted