Running ‘testthat.R’ [29s/29s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(antaresProcessing)
  Loading required package: antaresRead
  
  Attaching package: 'antaresProcessing'
  
  The following object is masked from 'package:testthat':
  
      compare
  
  > 
  > test_check("antaresProcessing")
  Importing links
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======                                                               |  10%
    |                                                                            
    |==============                                                        |  20%
    |                                                                            
    |=====================                                                 |  30%
    |                                                                            
    |============================                                          |  40%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |==========================================                            |  60%
    |                                                                            
    |=================================================                     |  70%
    |                                                                            
    |========================================================              |  80%
    |                                                                            
    |===============================================================       |  90%
    |                                                                            
    |======================================================================| 100%
  Saving _problems/test-addCongestionLink-8.R
  Saving _problems/test-addDownwardMargin-13.R
  Saving _problems/test-fillClusterDesc-7.R
  Saving _problems/test-loadFactor-12.R
  Saving _problems/test-modulation-8.R
  Saving _problems/test-surplusClusters-9.R
  Saving _problems/test-surplusSectors-10.R
  [ FAIL 7 | WARN 2 | SKIP 2 | PASS 130 ]
  
  ══ Skipped tests (2) ═══════════════════════════════════════════════════════════
  • empty test (2): 'test-aggregateMcYears.R:7:3',
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-addCongestionLink.R:8:3'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(x, , `:=`(c("congestionFrequencyDirect", "congestionFrequencyIndirect", "congestionHoursDirect", "congestionHoursIndirect"), list(round(sum((`CONG. PROB +` != 0)/.N), 2), round(sum((`CONG. PROB -` != 0)/.N), 2), sum(`CONG. PROB +` != 0), sum(`CONG. PROB -` != 0))), by = by)`: attempt access index 34/34 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─base::sapply(...) at test-addCongestionLink.R:3:1
   2.   └─base::lapply(X = X, FUN = FUN, ...)
   3.     └─antaresProcessing (local) FUN(X[[i]], ...)
   4.       └─antaresProcessing::addCongestionLink(dt) at test-addCongestionLink.R:8:3
   5.         ├─...[]
   6.         ├─antaresRead:::`[.antaresDataTable`(...)
   7.         ├─base::NextMethod("[", x)
   8.         └─data.table:::`[.data.table`(...)
  ── Error ('test-addDownwardMargin.R:7:3'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(ref_filter_by_vers, , `:=`(count, .N), by = select_col, keyby = TRUE)`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─base::sapply(...) at test-addDownwardMargin.R:3:1
    2.   └─base::lapply(X = X, FUN = FUN, ...)
    3.     └─antaresProcessing (local) FUN(X[[i]], ...)
    4.       ├─base::suppressWarnings(...) at test-addDownwardMargin.R:7:3
    5.       │ └─base::withCallingHandlers(...)
    6.       └─antaresRead::readAntares(...)
    7.         └─antaresRead:::.importOutputForClusters(...)
    8.           └─antaresRead:::.importOutputForClusters_w_mustrun(...)
    9.             └─antaresRead::readClusterDesc(opts)
   10.               └─antaresRead:::.readClusterDesc(...)
   11.                 └─antaresRead:::get_input_cluster_properties(...)
   12.                   ├─ref_filter_by_vers[, `:=`(count, .N), by = select_col, keyby = TRUE]
   13.                   └─data.table:::`[.data.table`(...)
  ── Error ('test-fillClusterDesc.R:7:3'): (code run outside of `test_that()`) ───
  Error in ``[.data.table`(ref_filter_by_vers, , `:=`(count, .N), by = select_col, keyby = TRUE)`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─base::sapply(...) at test-fillClusterDesc.R:3:1
   2.   └─base::lapply(X = X, FUN = FUN, ...)
   3.     └─antaresProcessing (local) FUN(X[[i]], ...)
   4.       └─antaresRead::readClusterDesc() at test-fillClusterDesc.R:7:3
   5.         └─antaresRead:::.readClusterDesc(...)
   6.           └─antaresRead:::get_input_cluster_properties(...)
   7.             ├─ref_filter_by_vers[, `:=`(count, .N), by = select_col, keyby = TRUE]
   8.             └─data.table:::`[.data.table`(...)
  ── Error ('test-loadFactor.R:12:5'): loadFactor ────────────────────────────────
  Error in ``[.data.table`(ref_filter_by_vers, , `:=`(count, .N), by = select_col, keyby = TRUE)`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(loadFactor(mydata)) at test-loadFactor.R:12:5
   2. │ └─base::withCallingHandlers(...)
   3. └─antaresProcessing::loadFactor(mydata)
   4.   └─antaresRead::readClusterDesc(opts)
   5.     └─antaresRead:::.readClusterDesc(...)
   6.       └─antaresRead:::get_input_cluster_properties(...)
   7.         ├─ref_filter_by_vers[, `:=`(count, .N), by = select_col, keyby = TRUE]
   8.         └─data.table:::`[.data.table`(...)
  ── Error ('test-modulation.R:8:3'): (code run outside of `test_that()`) ────────
  Error in ``[.data.table`(ref_filter_by_vers, , `:=`(count, .N), by = select_col, keyby = TRUE)`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─base::sapply(...) at test-modulation.R:3:1
    2.   └─base::lapply(X = X, FUN = FUN, ...)
    3.     └─antaresProcessing (local) FUN(X[[i]], ...)
    4.       ├─base::suppressWarnings(modulation(mydata)) at test-modulation.R:8:3
    5.       │ └─base::withCallingHandlers(...)
    6.       └─antaresProcessing::modulation(mydata)
    7.         └─antaresRead::readClusterDesc(opts)
    8.           └─antaresRead:::.readClusterDesc(...)
    9.             └─antaresRead:::get_input_cluster_properties(...)
   10.               ├─ref_filter_by_vers[, `:=`(count, .N), by = select_col, keyby = TRUE]
   11.               └─data.table:::`[.data.table`(...)
  ── Error ('test-surplusClusters.R:7:3'): (code run outside of `test_that()`) ───
  Error in ``[.data.table`(ref_filter_by_vers, , `:=`(count, .N), by = select_col, keyby = TRUE)`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─base::sapply(...) at test-surplusClusters.R:3:1
    2.   └─base::lapply(X = X, FUN = FUN, ...)
    3.     └─antaresProcessing (local) FUN(X[[i]], ...)
    4.       └─antaresRead::readAntares(...) at test-surplusClusters.R:7:3
    5.         └─antaresRead (local) .addOutputToRes(...)
    6.           ├─base::suppressWarnings(...)
    7.           │ └─base::withCallingHandlers(...)
    8.           └─plyr::llply(...)
    9.             ├─base::structure(lapply(pieces, .fun, ...), dim = dim(pieces))
   10.             └─base::lapply(pieces, .fun, ...)
   11.               └─antaresRead (local) FUN(X[[i]], ...)
   12.                 └─antaresRead (local) outputFun(x, ...)
   13.                   └─antaresRead::readClusterDesc(opts)
   14.                     └─antaresRead:::.readClusterDesc(...)
   15.                       └─antaresRead:::get_input_cluster_properties(...)
   16.                         ├─ref_filter_by_vers[, `:=`(count, .N), by = select_col, keyby = TRUE]
   17.                         └─data.table:::`[.data.table`(...)
  ── Error ('test-surplusSectors.R:10:3'): (code run outside of `test_that()`) ───
  Error in ``[.data.table`(ref_filter_by_vers, , `:=`(count, .N), by = select_col, keyby = TRUE)`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─base::sapply(...) at test-surplusSectors.R:3:1
    2.   └─base::lapply(X = X, FUN = FUN, ...)
    3.     └─antaresProcessing (local) FUN(X[[i]], ...)
    4.       ├─base::suppressWarnings(surplusSectors(mydata)) at test-surplusSectors.R:10:3
    5.       │ └─base::withCallingHandlers(...)
    6.       └─antaresProcessing::surplusSectors(mydata)
    7.         └─antaresProcessing::surplusClusters(x, "hourly")
    8.           └─antaresRead::readClusterDesc(opts)
    9.             └─antaresRead:::.readClusterDesc(...)
   10.               └─antaresRead:::get_input_cluster_properties(...)
   11.                 ├─ref_filter_by_vers[, `:=`(count, .N), by = select_col, keyby = TRUE]
   12.                 └─data.table:::`[.data.table`(...)
  
  [ FAIL 7 | WARN 2 | SKIP 2 | PASS 130 ]
  Error:
  ! Test failures.
  Execution halted