Running ‘testthat.R’ [33s/55s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(hutils)
  
  Attaching package: 'hutils'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  > 
  > test_check("hutils")
  Saving _problems/test-backwards-compatibility-46.R
  Saving _problems/test-backwards-compatibility-54.R
  Saving _problems/test-backwards-compatibility-62.R
  Saving _problems/test_1-0-0_mutate_other-130.R
  Saving _problems/test_1-0-0_mutate_other-179.R
  Saving _problems/test_1-0-0_mutate_other-217.R
  Saving _problems/test_1-3-0_longest_affix-39.R
  Saving _problems/test_1-3-0_longest_affix-64.R
  Saving _problems/test_1-4-0_mutate_ntile-30.R
  Saving _problems/test_1-4-0_numbers-v-words-28.R
  Saving _problems/test_mutate_ntile-137.R
  Saving _problems/test_mutate_ntile-176.R
  [ FAIL 12 | WARN 0 | SKIP 22 | PASS 654 ]
  
  ══ Skipped tests (22) ══════════════════════════════════════════════════════════
  • Not yet considered (1): 'test-ahull.R:69:3'
  • On CRAN (17): 'test-dev_copy2a4.R:11:3',
    'test_1-0-0_generate_LaTeX_manual.R:4:3', 'test_1-0-0_if_else.R:151:3',
    'test_1-2-0_RQ.R:15:3', 'test_benchmarks.R:4:3', 'test_benchmarks.R:23:3',
    'test_benchmarks.R:60:3', 'test_check_pkg_dependencies.R:4:3',
    'test_find_pattern_in.R:10:3', 'test_find_pattern_in.R:30:3',
    'test_find_pattern_in.R:47:3', 'test_find_pattern_in.R:89:3',
    'test_find_pattern_in.R:108:3', 'test_find_pattern_in.R:139:3',
    'test_mutate_ntile.R:90:3', 'test_provide-file.R:2:3',
    'test_provide-file.R:13:3'
  • identical(.Platform$OS.type, "windows") is not TRUE (3): 'test-dir2.R:4:3',
    'test-dir2.R:33:3', 'test-dir2.R:59:3'
  • packageVersion("survey") >= "4.1" is TRUE (1):
    'test_1-3-0_weighted_ntile.R:30:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-backwards-compatibility.R:46:3'): 1.0.0 ────────────────────────
  Error in ``[.data.table`(DT, , `:=`("DigestSha1", DigestSha1(.BY[["File"]])), by = "File")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_true(createDigestSha1Tbl("1.0.0")) at test-backwards-compatibility.R:46:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─hutils (local) createDigestSha1Tbl("1.0.0")
   5.   ├─DT[, `:=`("DigestSha1", DigestSha1(.BY[["File"]])), by = "File"] at test-backwards-compatibility.R:20:3
   6.   └─data.table:::`[.data.table`(...) at test-backwards-compatibility.R:20:3
  ── Error ('test-backwards-compatibility.R:54:3'): 1.1.0 ────────────────────────
  Error in ``[.data.table`(DT, , `:=`("DigestSha1", DigestSha1(.BY[["File"]])), by = "File")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_true(createDigestSha1Tbl("1.1.0")) at test-backwards-compatibility.R:54:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─hutils (local) createDigestSha1Tbl("1.1.0")
   5.   ├─DT[, `:=`("DigestSha1", DigestSha1(.BY[["File"]])), by = "File"] at test-backwards-compatibility.R:20:3
   6.   └─data.table:::`[.data.table`(...) at test-backwards-compatibility.R:20:3
  ── Error ('test-backwards-compatibility.R:62:3'): 1.2.0 ────────────────────────
  Error in ``[.data.table`(DT, , `:=`("DigestSha1", DigestSha1(.BY[["File"]])), by = "File")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_true(createDigestSha1Tbl("1.2.0")) at test-backwards-compatibility.R:62:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─hutils (local) createDigestSha1Tbl("1.2.0")
   5.   ├─DT[, `:=`("DigestSha1", DigestSha1(.BY[["File"]])), by = "File"] at test-backwards-compatibility.R:20:3
   6.   └─data.table:::`[.data.table`(...) at test-backwards-compatibility.R:20:3
  ── Error ('test_1-0-0_mutate_other.R:128:3'): var.weight works as expected ─────
  Error in ``[.data.table`(., , `:=`(.rank, rank(-`_temp`)), by = by)`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─flights_by_dest_month_day %>% ... at test_1-0-0_mutate_other.R:128:3
   2. ├─hutils::mutate_other(., "dest", var.weight = "N", by = "month")
   3. │ └─out %>% .[, .(`_temp` = .N), keyby = c(var, by)] %>% ...
   4. ├─.[, `:=`(.rank, rank(-`_temp`)), by = by]
   5. └─data.table:::`[.data.table`(...)
  ── Error ('test_1-0-0_mutate_other.R:172:3'): Mutate other weighted ────────────
  Error in ``[.data.table`(., , `:=`(.rank, rank(-N)), by = by)`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─... %>% .[origin == "JFK"] at test_1-0-0_mutate_other.R:172:3
   2. ├─hutils::mutate_other(...)
   3. │ └─out %>% .[, .N, keyby = c(var, by)] %>% ...
   4. ├─.[, `:=`(.rank, rank(-N)), by = by]
   5. └─data.table:::`[.data.table`(., , `:=`(.rank, rank(-N)), by = by)
  ── Error ('test_1-0-0_mutate_other.R:209:3'): Mutate other weighted with mass ──
  Error in ``[.data.table`(., , `:=`(.rank, rank(-N)), by = by)`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─... %>% .[] at test_1-0-0_mutate_other.R:209:3
   2. ├─hutils::mutate_other(...)
   3. │ └─out %>% .[, .N, keyby = c(var, by)] %>% ...
   4. ├─.[, `:=`(.rank, rank(-N)), by = by]
   5. └─data.table:::`[.data.table`(., , `:=`(.rank, rank(-N)), by = by)
  ── Error ('test_1-3-0_longest_affix.R:38:3'): trimming ─────────────────────────
  Error in ``[.data.table`(o1, , `:=`("res", substr(v, nchar(Prefix) + 1L, .BY[[1L]] - nchar(Suffix))), by = "ncharv")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test_1-3-0_longest_affix.R:38:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─hutils::trim_common_affixes(paste0("QQQ**", y, "(BBB)"))
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test_1-3-0_longest_affix.R:63:3'): Corner cases ─────────────────────
  Error in ``[.data.table`(o1, , `:=`("res", substr(v, nchar(Prefix) + 1L, .BY[[1L]] - nchar(Suffix))), by = "ncharv")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_identical(...) at test_1-3-0_longest_affix.R:63:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─hutils::trim_common_affixes(c(NULL, "aabbaa", "aaccaa"))
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test_1-4-0_mutate_ntile.R:30:3'): !is.null(by) coverage ─────────────
  Error in ``[.data.table`(DT, , `:=`((new.col), .ntile(.SD[[.col]], n, check.na = check.na)), .SDcols = c(.col), by = c(by))`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─hutils::mutate_ntile(DT, "y", by = "x", n = 4, new.col = "Above") at test_1-4-0_mutate_ntile.R:30:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_1-4-0_numbers-v-words.R:27:3'): Long ───────────────────────────
  Error in ``[.data.table`(DT, , `:=`("res", word2number(.BY[[1L]])), by = "w")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test_1-4-0_numbers-v-words.R:27:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─hutils:::word2number(...)
   5.   ├─DT[, `:=`("res", word2number(.BY[[1L]])), by = "w"]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test_mutate_ntile.R:130:3'): bys ────────────────────────────────────
  Error in ``[.data.table`(DT, , `:=`((new.col), weighted_ntile(.SD[[.col]], weights = if (!is.null(weights)) {     .SD[[weights]] }, n = n)), .SDcols = c(.col, weights), by = c(by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─... %>% filter(manufacturer == "BOEING", seatsQuintile == 5) at test_mutate_ntile.R:130:3
   2. ├─dplyr::filter(., manufacturer == "BOEING", seatsQuintile == 5)
   3. ├─dplyr::summarise(., seats = mean(seats))
   4. ├─dplyr::group_by(., manufacturer, seatsQuintile)
   5. └─hutils::mutate_ntile(., seats, n = 5, by = "manufacturer")
   6.   ├─...[]
   7.   └─data.table:::`[.data.table`(...)
  ── Error ('test_mutate_ntile.R:176:3'): Error handling (bys, definitely sorted) ──
  Error in ``[.data.table`(DT, , `:=`((new.col), .ntile(.SD[[.col]], n, check.na = check.na)), .SDcols = c(.col), keyby = c(keyby))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─hutils::mutate_ntile(DT, "col", keyby = "by", n = 10L) at test_mutate_ntile.R:176:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  
  [ FAIL 12 | WARN 0 | SKIP 22 | PASS 654 ]
  Error:
  ! Test failures.
  Execution halted