* using log directory 'd:/Rcompile/CRANpkg/local/4.6/healthequal.Rcheck' * using R Under development (unstable) (2025-12-23 r89222 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.3.0 GNU Fortran (GCC) 14.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'healthequal/DESCRIPTION' ... OK * this is package 'healthequal' version '1.0.1' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'healthequal' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [3s] OK * checking whether the package can be loaded with stated dependencies ... [3s] OK * checking whether the package can be unloaded cleanly ... [3s] OK * checking whether the namespace can be loaded with stated dependencies ... [3s] OK * checking whether the namespace can be unloaded cleanly ... [3s] OK * checking loading without being on the library search path ... [3s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [11s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... [0s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [15s] 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 ... -> do.call -> get_comparisons -> [ -> [.data.table Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [12s] 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 * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [10s] OK * checking PDF version of manual ... [27s] OK * checking HTML version of manual ... [8s] OK * DONE Status: 2 ERRORs