Running ‘testthat.R’ [10s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(clinUtils)
  > 
  > test_check("clinUtils")
  Saving _problems/test_compareTables-121.R
  [ FAIL 6 | WARN 1 | SKIP 2 | PASS 289 ]
  
  ══ Skipped tests (2) ═══════════════════════════════════════════════════════════
  • On CRAN (2): 'test_getClinDT.R:838:7', 'test_getClinDT.R:855:7'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_compareTables.R:118:7'): When reference columns are not specified, all columns are used as the reference ──
  Error in ``[.data.table`(diffDataDetailed, , `:=`((colsDiff), {     if (all(`Comparison type` == "Addition")) {         as.list(rep("+", length(cols)))     }     else if (all(`Comparison type` == "Removal")) {         as.list(rep("-", length(cols)))     }     else {         lapply(.SD, function(x) {             ifelse(uniqueN(x) == 1, "==", "!=")         })     } }), .SDcols = cols, by = referenceVars)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test_compareTables.R:118:7
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─clinUtils::compareTables(newData, oldData)
   5.   └─clinUtils::exportDiffData(...)
   6.     └─clinUtils:::formatDetailsComparison(...)
   7.       ├─...[]
   8.       └─data.table:::`[.data.table`(...)
  ── Error ('test_compareTables.R:266:7'): The difference dataset is exported correctly to an interactive table ──
  Error in ``[.data.table`(diffDataDetailed, , `:=`((colsDiff), {     if (all(`Comparison type` == "Addition")) {         as.list(rep("+", length(cols)))     }     else if (all(`Comparison type` == "Removal")) {         as.list(rep("-", length(cols)))     }     else {         lapply(.SD, function(x) {             ifelse(uniqueN(x) == 1, "==", "!=")         })     } }), .SDcols = cols, by = referenceVars)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(res <- exportDiffData(diffData)) at test_compareTables.R:266:7
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─clinUtils::exportDiffData(diffData)
   10.   └─clinUtils:::formatDetailsComparison(...)
   11.     ├─...[]
   12.     └─data.table:::`[.data.table`(...)
  ── Error ('test_compareTables.R:292:7'): The merged product of the difference dataset and new dataset is exported correctly to an interactive table ──
  Error in ``[.data.table`(diffDataDetailed, , `:=`((colsDiff), {     if (all(`Comparison type` == "Addition")) {         as.list(rep("+", length(cols)))     }     else if (all(`Comparison type` == "Removal")) {         as.list(rep("-", length(cols)))     }     else {         lapply(.SD, function(x) {             ifelse(uniqueN(x) == 1, "==", "!=")         })     } }), .SDcols = cols, by = referenceVars)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(res <- exportDiffData(diffData, newDataDiff = newDataDiff)) at test_compareTables.R:292:7
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─clinUtils::exportDiffData(diffData, newDataDiff = newDataDiff)
   10.   └─clinUtils:::formatDetailsComparison(...)
   11.     ├─...[]
   12.     └─data.table:::`[.data.table`(...)
  ── Error ('test_compareTables.R:316:7'): The merged product of the difference dataset and old dataset is exported correctly to an interactive table ──
  Error in ``[.data.table`(diffDataDetailed, , `:=`((colsDiff), {     if (all(`Comparison type` == "Addition")) {         as.list(rep("+", length(cols)))     }     else if (all(`Comparison type` == "Removal")) {         as.list(rep("-", length(cols)))     }     else {         lapply(.SD, function(x) {             ifelse(uniqueN(x) == 1, "==", "!=")         })     } }), .SDcols = cols, by = referenceVars)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_compareTables.R:316:7
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─clinUtils::compareTables(...)
   10.   └─clinUtils::exportDiffData(...)
   11.     └─clinUtils:::formatDetailsComparison(...)
   12.       ├─...[]
   13.       └─data.table:::`[.data.table`(...)
  ── Error ('test_compareTables.R:357:7'): A placeholder is displayed in the interactive table if there is no difference between the new and old data ──
  Error in ``[.data.table`(diffDataDetailed, , `:=`((colsDiff), {     if (all(`Comparison type` == "Addition")) {         as.list(rep("+", length(cols)))     }     else if (all(`Comparison type` == "Removal")) {         as.list(rep("-", length(cols)))     }     else {         lapply(.SD, function(x) {             ifelse(uniqueN(x) == 1, "==", "!=")         })     } }), .SDcols = cols, by = referenceVars)`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(res <- exportDiffData(diffData)) at test_compareTables.R:357:7
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─clinUtils::exportDiffData(diffData)
   10.   └─clinUtils:::formatDetailsComparison(...)
   11.     ├─...[]
   12.     └─data.table:::`[.data.table`(...)
  ── Error ('test_compareTables.R:378:7'): Column names are renamed correctly in the interactive difference data table ──
  Error in ``[.data.table`(diffDataDetailed, , `:=`((colsDiff), {     if (all(`Comparison type` == "Addition")) {         as.list(rep("+", length(cols)))     }     else if (all(`Comparison type` == "Removal")) {         as.list(rep("-", length(cols)))     }     else {         lapply(.SD, function(x) {             ifelse(uniqueN(x) == 1, "==", "!=")         })     } }), .SDcols = cols, by = referenceVars)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_compareTables.R:378:7
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─clinUtils::exportDiffData(...)
   10.   └─clinUtils:::formatDetailsComparison(...)
   11.     ├─...[]
   12.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 6 | WARN 1 | SKIP 2 | PASS 289 ]
  Error:
  ! Test failures.
  Execution halted