Running ‘testthat.R’ [33s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(easySdcTable)
  Loading required package: SSBtools
  > 
  > test_check("easySdcTable")
  Saving _problems/test-ProtectTable-20.R
  Saving _problems/test-ProtectTable-27.R
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 19 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-ProtectTable.R:20:3'): Simple works ────────────────────────────
  Error in ``[.data.table`(subDat, , eval(expr), by = key(subDat))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─easySdcTable (local) PTxyzTest(EasyData("z1"), c("region", "hovedint"), "ant", method = "Simple") at test-ProtectTable.R:20:3
    2.   └─easySdcTable::PTxyz(..., IncProgress = NULL) at test-ProtectTable.R:5:3
    3.     ├─easySdcTable::ProtectTable(data, dimVar, freqVar, ...)
    4.     │ └─base::eval(sysCall, envir = parentFrame)
    5.     │   └─base::eval(sysCall, envir = parentFrame)
    6.     └─easySdcTable::PTwrap(data, dimVar, freqVar, ...)
    7.       └─easySdcTable::ProtectTable(...)
    8.         └─easySdcTable::ProtectTable1(...)
    9.           └─sdcTable::protectTable(...)
   10.             └─sdcTable:::.protect_simpleheuristic_old(object, input = paraList)
   11.               ├─subDat[, eval(expr), by = key(subDat)]
   12.               └─data.table:::`[.data.table`(subDat, , eval(expr), by = key(subDat))
  ── Error ('test-ProtectTable.R:27:3'): SimpleSingle works ──────────────────────
  Error in ``[.data.table`(subDat, , eval(expr), by = key(subDat))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─easySdcTable (local) PTxyzTest(z, 1:2, "y0", protectZeros = TRUE, method = "SimpleSingle") at test-ProtectTable.R:27:3
    2.   └─easySdcTable::PTxyz(..., IncProgress = NULL) at test-ProtectTable.R:5:3
    3.     ├─easySdcTable::ProtectTable(data, dimVar, freqVar, ...)
    4.     │ └─base::eval(sysCall, envir = parentFrame)
    5.     │   └─base::eval(sysCall, envir = parentFrame)
    6.     └─easySdcTable::PTwrap(data, dimVar, freqVar, ...)
    7.       └─easySdcTable:::ProtectTableSimpleSingle(..., maxN = maxN)
    8.         └─easySdcTable::ProtectTable(...)
    9.           └─easySdcTable::ProtectTable1(...)
   10.             └─sdcTable::protectTable(...)
   11.               └─sdcTable:::.protect_simpleheuristic_old(object, input = paraList)
   12.                 ├─subDat[, eval(expr), by = key(subDat)]
   13.                 └─data.table:::`[.data.table`(subDat, , eval(expr), by = key(subDat))
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 19 ]
  Error:
  ! Test failures.
  Execution halted