Running ‘testthat.R’ [2s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ptable)
  
  Attaching package: 'ptable'
  
  The following object is masked from 'package:graphics':
  
      plot
  
  The following object is masked from 'package:base':
  
      plot
  
  > 
  > test_check("ptable")
  Saving _problems/test-examples-31.R
  Saving _problems/test-functions-2.R
  Ignoring argument `step` for freqency tables
  Ignoring argument `step` for freqency tables
  Ignoring argument `step` for freqency tables
  Ignoring argument `step` for freqency tables
  Ignoring argument `step` for freqency tables
  Ignoring argument `step` for freqency tables
  Ignoring argument `step` for freqency tables
  
  Row 2: original frequency i = 1
  -------------------------------
  j1 01234
  j2 01234
  v  -10123
  i_char  1
  j_char  01234
  v_char  -10123
  i 1
  j 01234
  p_init 00000
  p_lb 0.000000010.000000010.000000010.000000010.00000001
  p_ub 11111
  
  pstay 000
  epsilon 0.00000001
  p_new:0.3698821778733170.3698821778733170.1710603991401490.0687039566064850.0204712885067327
  $p_mean
       [,1]
  [1,]    0
  
  $p_var
       [,1]
  [1,]    1
  
  $p_sum
  [1] 1
  
  $p_stay
  [1] 0.36988218
  
  Variable 1 - Iter 1
  check_var: FALSE
  check_pstay: TRUE
  p_lb for p_stay: 0.00000001
  Sum of p: 0
  Saving _problems/test-params-121.R
  Saving _problems/test-params-152.R
  Saving _problems/test-params-157.R
  Saving _problems/test-params-159.R
  Saving _problems/test-params-163.R
  Saving _problems/test-params-168.R
  Saving _problems/test-params-169.R
  Saving _problems/test-params-192.R
  [ FAIL 10 | WARN 0 | SKIP 0 | PASS 31 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-examples.R:10:3'): Example is correct ──────────────────────────
  Error in ``[.data.table`(dt, , `:=`(p_int_ub, cumsum(p)), by = list(i))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-examples.R:10:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─ptable::pt_ex_cnts()
   5.   └─ptable::create_cnt_ptable(...)
   6.     └─ptable::create_ptable(...)
   7.       └─ptable:::pt_create_pTable(...)
   8.         ├─dt[, `:=`(p_int_ub, cumsum(p)), by = list(i)]
   9.         └─data.table:::`[.data.table`(...)
  ── Error ('test-functions.R:2:1'): (code run outside of `test_that()`) ─────────
  Error in ``[.data.table`(dt, , `:=`(p_int_ub, cumsum(p)), by = list(i))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─ptable::create_cnt_ptable(D = 3, V = 1) at test-functions.R:2:1
   2.   └─ptable::create_ptable(...)
   3.     └─ptable:::pt_create_pTable(...)
   4.       ├─dt[, `:=`(p_int_ub, cumsum(p)), by = list(i)]
   5.       └─data.table:::`[.data.table`(...)
  ── Failure ('test-params.R:117:3'): pt_create_pTable() is ok ───────────────────
  Expected `pt_create_pTable(params = para1, debugging = TRUE, monitoring = TRUE)` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  ── Failure ('test-params.R:148:3'): modify_cnt_ptable() is ok ──────────────────
  Expected `modify_cnt_ptable(...)` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  ── Failure ('test-params.R:153:3'): modify_cnt_ptable() is ok ──────────────────
  Expected `modify_cnt_ptable(...)` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  ── Failure ('test-params.R:159:3'): modify_cnt_ptable() is ok ──────────────────
  Expected `modify_cnt_ptable(ck_ptab_cnts, threshold = 0.1, seed = 123)` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  ── Error ('test-params.R:162:3'): modify_cnt_ptable() is ok ────────────────────
  Error in ``[.data.table`(dt, , `:=`(p_int_ub, cumsum(p)), by = list(i))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-params.R:162:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─ptable::modify_cnt_ptable(pt_create_pTable(para1), 0.3, seed = 5467)
    8. └─ptable:::pt_create_pTable(para1)
    9.   ├─dt[, `:=`(p_int_ub, cumsum(p)), by = list(i)]
   10.   └─data.table:::`[.data.table`(...)
  ── Failure ('test-params.R:168:3'): Testing different optim settings ───────────
  Expected `create_cnt_ptable(D = 3, V = 1, optim = 2)` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  ── Failure ('test-params.R:169:3'): Testing different optim settings ───────────
  Expected `create_cnt_ptable(D = 3, V = 1, optim = 3)` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  ── Failure ('test-params.R:192:13'): Testing if only ptable_params-class is generated and imported again ──
  Expected `create_ptable(params = para2)` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 7/7 in VECTOR_ELT
  
  [ FAIL 10 | WARN 0 | SKIP 0 | PASS 31 ]
  Error:
  ! Test failures.
  Execution halted