Running ‘testthat.R’ [2s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dedupewider)
  > 
  > test_check("dedupewider")
  Saving _problems/test-dedupe_wide-31.R
  Saving _problems/test-dedupe_wide-43.R
  Saving _problems/test-dedupe_wide-56.R
  Saving _problems/test-dedupe_wide-69.R
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 19 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-dedupe_wide.R:31:3'): no changes in df when empty or NA or no duplicates ──
  Error in ``[.data.table`(x_tmp, , `:=`(V1, list(list(....idx))), by = value)`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(dedupe_wide(x, cols_dedupe), x) at test-dedupe_wide.R:31:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─dedupewider::dedupe_wide(x, cols_dedupe)
   5.   └─dedupewider:::find_duplicated_indexes(x, cols_dedupe)
   6.     ├─x_tmp[, `:=`(V1, list(list(....idx))), by = value]
   7.     └─data.table:::`[.data.table`(...)
  ── Error ('test-dedupe_wide.R:43:3'): rows with NA are not duplicated ──────────
  Error in ``[.data.table`(x_tmp, , `:=`(V1, list(list(....idx))), by = value)`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(nrow(dedupe_wide(x, cols_dedupe)), 3) at test-dedupe_wide.R:43:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─base::nrow(dedupe_wide(x, cols_dedupe))
   5. └─dedupewider::dedupe_wide(x, cols_dedupe)
   6.   └─dedupewider:::find_duplicated_indexes(x, cols_dedupe)
   7.     ├─x_tmp[, `:=`(V1, list(list(....idx))), by = value]
   8.     └─data.table:::`[.data.table`(...)
  ── Error ('test-dedupe_wide.R:56:3'): deduplication ────────────────────────────
  Error in ``[.data.table`(x_tmp, , `:=`(V1, list(list(....idx))), by = value)`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(nrow(dedupe_wide(x, cols_dedupe)), 1) at test-dedupe_wide.R:56:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─base::nrow(dedupe_wide(x, cols_dedupe))
   5. └─dedupewider::dedupe_wide(x, cols_dedupe)
   6.   └─dedupewider:::find_duplicated_indexes(x, cols_dedupe)
   7.     ├─x_tmp[, `:=`(V1, list(list(....idx))), by = value]
   8.     └─data.table:::`[.data.table`(...)
  ── Error ('test-dedupe_wide.R:67:3'): columns order ────────────────────────────
  Error in ``[.data.table`(x_tmp, , `:=`(V1, list(list(....idx))), by = value)`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-dedupe_wide.R:67:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─dedupewider::dedupe_wide(x, paste0("tel_", 1:5), "name")
   5.   └─dedupewider:::find_duplicated_indexes(x, cols_dedupe)
   6.     ├─x_tmp[, `:=`(V1, list(list(....idx))), by = value]
   7.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 19 ]
  Error:
  ! Test failures.
  Execution halted