Running ‘testthat.R’ [20s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(NetworkRiskMeasures)
  Loading required package: Matrix
  > 
  > test_check("NetworkRiskMeasures")
  ── 1. Failure: Simple Example (@test_3_impacts.R#29)  ──────────────────────────
  `imd` not equal to `check_imd`.
  Component "vertex": Modes: character, numeric
  Component "vertex": Attributes: < target is NULL, current is list >
  Component "vertex": target is character, current is factor
  
  List of 2
   $ info       :List of 9
    ..$ method       : chr "debtrank"
    ..$ params       : list()
    ..$ assets_matrix: num [1:125, 1:125] 0 0 0 0 0 0 0 0 0 0 ...
    ..$ exposures    : num [1:125, 1:125] 0 0 0 0 0 0 0 0 0 0 ...
    ..$ buffer       : num [1:125] 5.63 2.85 3.98 5.66 4.45 ...
    .. [list output truncated]
   $ simulations:List of 25
    ..$ 1 pct shock :List of 2
    ..$ 2 pct shock :List of 2
    ..$ 3 pct shock :List of 2
    ..$ 4 pct shock :List of 2
    ..$ 5 pct shock :List of 2
    .. [list output truncated]
  Contagion Simulations
  
  Method:
   Function - debtrank 
   With parameters: 
  data frame with 0 columns and 0 rows
  
  Scenarios (showing 6 of 25 simulations):
   Simulation 1 - 1 pct shock 
   Simulation 2 - 2 pct shock 
   Simulation 3 - 3 pct shock 
   (...)
   Simulation 23 - 23 pct shock 
   Simulation 24 - 24 pct shock 
   Simulation 25 - 25 pct shock 
  
  Use summary to get more details.Contagion Simulations Summary
  
  Info:
   Propagation Function: debtrank 
   With parameters: 
  data frame with 0 columns and 0 rows
  
  Simulation summary (showing 10 of 25 -- decreasing order of additional stress):
       Scenario Original Stress Additional Stress Original Losses
   22 pct shock            0.22              0.25             174
   23 pct shock            0.23              0.25             182
   21 pct shock            0.21              0.25             166
   24 pct shock            0.24              0.25             190
   25 pct shock            0.25              0.25             198
   20 pct shock            0.20              0.25             158
   19 pct shock            0.19              0.25             150
   18 pct shock            0.18              0.25             142
   17 pct shock            0.17              0.25             134
   16 pct shock            0.16              0.25             127
   Additional Losses Additional Defaults
                 173                  13
                 179                  14
                 167                  12
                 185                  14
                 191                  15
                 161                  12
                 155                  11
                 149                  11
                 143                  11
                 137                  11
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 28 | SKIPPED: 1 | WARNINGS: 0 | FAILED: 1 ]
  1. Failure: Simple Example (@test_3_impacts.R#29) 
  
  Error: testthat unit tests failed
  Execution halted