Running ‘testthat.R’ [1s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > testthat::test_check("openEBGM")
  Loading required package: openEBGM
  ── 1. Error: correct number of rows and columns from processRaw (@testA_Counts.R
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(nrow(processRaw(dat)), 6) at testthat/testA_Counts.R:27
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: nrow(processRaw(dat))
  5: processRaw(dat)
  6: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  7: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ── 2. Error: correct column names from processRaw (@testA_Counts.R#39)  ────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_match(paste0(names(processRaw(dat)), collapse = ""), "var1var2NERRPRR") at testthat/testA_Counts.R:39
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: paste0(names(processRaw(dat)), collapse = "")
  5: processRaw(dat)
  6: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  7: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ── 3. Error: values returned from processRaw make sense (@testA_Counts.R#56)  ──
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(max(processRaw(dat)$N), 7) at testthat/testA_Counts.R:56
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: processRaw(dat)
  5: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  6: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ── 4. Failure: do warnings/errors get correctly printed? (@testA_Counts.R#89)  ─
  `processRaw(dat_no_strat, stratify = TRUE)` threw an error with unexpected message.
  Expected match: "no stratification variables found"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 5. Failure: do warnings/errors get correctly printed? (@testA_Counts.R#92)  ─
  `processRaw(dat_missing4, stratify = TRUE)` threw an error with unexpected message.
  Expected match: "missing values are not allowed for stratification variables"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 6. Error: do warnings/errors get correctly printed? (@testA_Counts.R#95)  ───
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_message(suppressWarnings(processRaw(dat, stratify = TRUE)), "stratification variables used: strat1, strat2", 
         fixed = TRUE) at testthat/testA_Counts.R:95
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: suppressWarnings(processRaw(dat, stratify = TRUE))
  7: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  8: processRaw(dat, stratify = TRUE)
  9: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  10: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ── 7. Error: are PRR results the same regardless of stratification? (@testA_Coun
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(processRaw(dat, digits = 3)$PRR, suppressWarnings(processRaw(dat, stratify = TRUE, 
         digits = 3))$PRR) at testthat/testA_Counts.R:110
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: processRaw(dat, digits = 3)
  5: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  6: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ── 8. Failure: works with a single stratification variable? (@testA_Counts.R#121
  `suppressWarnings(processRaw(dat[, -4], stratify = TRUE))` threw an error.
  Message: SETLENGTH() cannot be applied to an ALTVEC object.
  Class:   simpleError/error/condition
  
  ── 9. Error: (unknown) (@testA_Counts.R#125)  ──────────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: processRaw(dat, zeroes = TRUE, digits = 3) at testthat/testA_Counts.R:125
  2: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  3: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ── 10. Error: (unknown) (@testEBGM.R#4)  ───────────────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: processRaw(data = caers, stratify = FALSE) at testthat/testEBGM.R:4
  2: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  3: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ── 11. Error: (unknown) (@testHypers.R#15)  ────────────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: processRaw(dat) at testthat/testHypers.R:15
  2: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  3: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ── 12. Error: (unknown) (@testObject.R#4)  ─────────────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: processRaw(caers) at testthat/testObject.R:4
  2: data[, j = list(N = .countUnique(id)), by = .(var1, var2)]
  3: `[.data.table`(data, , j = list(N = .countUnique(id)), by = .(var1, var2))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 50 SKIPPED: 0 FAILED: 12
  1. Error: correct number of rows and columns from processRaw (@testA_Counts.R#27) 
  2. Error: correct column names from processRaw (@testA_Counts.R#39) 
  3. Error: values returned from processRaw make sense (@testA_Counts.R#56) 
  4. Failure: do warnings/errors get correctly printed? (@testA_Counts.R#89) 
  5. Failure: do warnings/errors get correctly printed? (@testA_Counts.R#92) 
  6. Error: do warnings/errors get correctly printed? (@testA_Counts.R#95) 
  7. Error: are PRR results the same regardless of stratification? (@testA_Counts.R#110) 
  8. Failure: works with a single stratification variable? (@testA_Counts.R#121) 
  9. Error: (unknown) (@testA_Counts.R#125) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted