Last updated on 2025-12-28 01:49:21 CET.
| Package | ERROR | OK |
|---|---|---|
| ptable | 1 | 12 |
Current CRAN status: ERROR: 1, OK: 12
Version: 1.0.0
Check: examples
Result: ERROR
Running examples in 'ptable-Ex.R' failed
The error most likely occurred in:
> ### Name: modify_cnt_ptable
> ### Title: Modify a ptable suitable for frequency count variables
> ### Aliases: modify_cnt_ptable modify_cnts_ptable
>
> ### ** Examples
>
> # Original ptable
> ptab <- create_cnt_ptable(3, 1)
Error in `[.data.table`(dt, , `:=`(p_int_ub, cumsum(p)), by = list(i)) :
attempt access index 7/7 in VECTOR_ELT
Calls: create_cnt_ptable ... create_ptable -> pt_create_pTable -> [ -> [.data.table
Execution halted
Flavor: r-devel-windows-x86_64
Version: 1.0.0
Check: tests
Result: ERROR
Running 'testthat.R' [4s]
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
Flavor: r-devel-windows-x86_64
Version: 1.0.0
Check: re-building of vignette outputs
Result: ERROR
Error(s) in re-building vignettes:
--- re-building 'introduction.Rmd' using rmarkdown
Quitting from introduction.Rmd:77-81 [unnamed-chunk-4]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `[.data.table`:
! attempt access index 7/7 in VECTOR_ELT
---
Backtrace:
▆
1. └─ptable::create_cnt_ptable(D = 2, V = 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`(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'introduction.Rmd' failed with diagnostics:
attempt access index 7/7 in VECTOR_ELT
--- failed re-building 'introduction.Rmd'
SUMMARY: processing the following file failed:
'introduction.Rmd'
Error: Vignette re-building failed.
Execution halted
Flavor: r-devel-windows-x86_64
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.