CRAN Package Check Results for Maintainer ‘Katherine Kirkby <kirkbyk at who.int>’

Last updated on 2025-12-28 01:49:13 CET.

Package ERROR OK
healthequal 1 12

Package healthequal

Current CRAN status: ERROR: 1, OK: 12

Version: 1.0.1
Check: examples
Result: ERROR Running examples in 'healthequal-Ex.R' failed The error most likely occurred in: > ### Name: rii > ### Title: Relative index of inequality (RII) > ### Aliases: rii > > ### ** Examples > > # example code 1 > data(IndividualSample) > head(IndividualSample) id psu strata weight subgroup subgroup_order sba dtp3 1 1 88 1 0.351672 Quintile 3 3 1 NA 2 2 1337 38 0.431545 Quintile 1 (poorest) 1 1 1 3 3 450 18 0.482483 Quintile 2 2 1 NA 4 4 1692 56 0.407390 Quintile 1 (poorest) 1 0 NA 5 5 752 23 1.547062 Quintile 5 (richest) 5 1 NA 6 6 1033 30 2.429523 Quintile 5 (richest) 5 1 NA favourable_indicator indicator_scale 1 1 100 2 1 100 3 1 100 4 1 100 5 1 100 6 1 100 > with(IndividualSample, + rii(est = sba, + subgroup_order = subgroup_order, + weight = weight, + psu = psu, + strata = strata)) measure estimate se lowerci upperci 1 rii 2.038107 0.03503773 1.902842 2.182987 > # example code 2 > data(OrderedSample) > head(OrderedSample) indicator 1 Births attended by skilled health personnel (%) 2 Births attended by skilled health personnel (%) 3 Births attended by skilled health personnel (%) 4 Births attended by skilled health personnel (%) 5 Births attended by skilled health personnel (%) dimension subgroup subgroup_order 1 Economic status (wealth quintile) Quintile 1 (poorest) 1 2 Economic status (wealth quintile) Quintile 2 2 3 Economic status (wealth quintile) Quintile 3 3 4 Economic status (wealth quintile) Quintile 4 4 5 Economic status (wealth quintile) Quintile 5 (richest) 5 estimate se population setting_average favourable_indicator 1 75.60530 1.5996131 2072.436 91.59669 1 2 91.01997 1.1351504 2112.204 91.59669 1 3 96.03959 0.6461946 1983.059 91.59669 1 4 97.04223 0.5676206 2052.124 91.59669 1 5 99.22405 0.2237683 1884.510 91.59669 1 ordered_dimension indicator_scale 1 1 100 2 1 100 3 1 100 4 1 100 5 1 100 > with(OrderedSample, + rii(est = estimate, + subgroup_order = subgroup_order, + pop = population)) Error in `[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp) : attempt access index 13/13 in VECTOR_ELT Calls: with ... <Anonymous> -> do.call -> get_comparisons -> [ -> [.data.table Execution halted Flavor: r-devel-windows-x86_64

Version: 1.0.1
Check: tests
Result: ERROR Running 'spelling.R' [0s] Running 'testthat.R' [11s] Running the tests in 'tests/testthat.R' failed. Complete output: > > library(testthat) > library(healthequal) > > test_check("healthequal") Saving _problems/test-rii-19.R Saving _problems/test-sii-20.R [ FAIL 2 | WARN 8 | SKIP 0 | PASS 45 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-rii.R:17:3'): rii function calculates RII correctly ──────────── Error in ``[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp)`: attempt access index 13/13 in VECTOR_ELT Backtrace: ▆ 1. └─healthequal::rii(pop = pop, est = est, subgroup_order = subgroup_order) at test-rii.R:17:3 2. ├─marginaleffects::avg_comparisons(...) 3. │ └─base::eval.parent(call_attr) 4. │ └─base::eval(expr, p) 5. │ └─base::eval(expr, p) 6. └─marginaleffects::comparisons(...) 7. ├─base::do.call("get_comparisons", args) 8. └─marginaleffects:::get_comparisons(...) 9. ├─out[, `:=`(tmp_idx, seq_len(.N)), by = tmp] 10. └─data.table:::`[.data.table`(...) ── Error ('test-sii.R:17:3'): sii function calculates SII correctly ──────────── Error in ``[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp)`: attempt access index 13/13 in VECTOR_ELT Backtrace: ▆ 1. └─healthequal::sii(...) at test-sii.R:17:3 2. ├─marginaleffects::avg_comparisons(...) 3. │ └─base::eval.parent(call_attr) 4. │ └─base::eval(expr, p) 5. │ └─base::eval(expr, p) 6. └─marginaleffects::comparisons(...) 7. ├─base::do.call("get_comparisons", args) 8. └─marginaleffects:::get_comparisons(...) 9. ├─out[, `:=`(tmp_idx, seq_len(.N)), by = tmp] 10. └─data.table:::`[.data.table`(...) [ FAIL 2 | WARN 8 | SKIP 0 | PASS 45 ] Error: ! Test failures. 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.