Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(pricelevels)
  
  Attaching package: 'pricelevels'
  
  The following object is masked from 'package:graphics':
  
      pairs
  
  > 
  > test_check("pricelevels")
  Saving _problems/test-bilateral.index-12.R
  Saving _problems/test-cpd-12.R
  Saving _problems/test-geks-12.R
  Saving _problems/test-gerardi-12.R
  Saving _problems/test-gkhamis-12.R
  Saving _problems/test-helper-25.R
  Saving _problems/test-neighbors-9.R
  Saving _problems/test-pricelevels-18.R
  Saving _problems/test-ratios-11.R
  Saving _problems/test-rdata-7.R
  [ FAIL 10 | WARN 0 | SKIP 0 | PASS 42 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-bilateral.index.R:12:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 1, B = 1, N = 4) at test-bilateral.index.R:12:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-cpd.R:12:1'): (code run outside of `test_that()`) ──────────────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 1, B = 1, N = 4) at test-cpd.R:12:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-geks.R:12:1'): (code run outside of `test_that()`) ─────────────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 1, B = 1, N = 4) at test-geks.R:12:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-gerardi.R:12:1'): (code run outside of `test_that()`) ──────────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 1, B = 1, N = 4) at test-gerardi.R:12:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-gkhamis.R:12:1'): (code run outside of `test_that()`) ──────────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 1, B = 1, N = 4) at test-gkhamis.R:12:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-helper.r:25:1'): (code run outside of `test_that()`) ───────────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 3, B = 1, N = 4, gaps = 0.1) at test-helper.r:25:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-neighbors.R:9:1'): (code run outside of `test_that()`) ─────────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 1, B = 1, N = 4) at test-neighbors.R:9:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-pricelevels.R:18:1'): (code run outside of `test_that()`) ──────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 1, B = 1, N = 4) at test-pricelevels.R:18:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-ratios.R:11:1'): (code run outside of `test_that()`) ───────────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 3, B = 1, N = 4) at test-ratios.R:11:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-rdata.R:7:1'): (code run outside of `test_that()`) ─────────────
  Error in ``[.data.table`(dt, , `:=`("prod_share", as.numeric(sample(x = 1:3, size = .N, replace = TRUE))), by = c("region", "group"))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─pricelevels::rdata(R = 6, B = 1, N = 15) at test-rdata.R:7:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  
  [ FAIL 10 | WARN 0 | SKIP 0 | PASS 42 ]
  Error:
  ! Test failures.
  Execution halted