- 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 'pacta.multi.loanbook/DESCRIPTION' ... OK
- this is package 'pacta.multi.loanbook' version '0.1.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 'pacta.multi.loanbook' can be installed ... OK
See the install log for details.
- 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 ... [1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s] OK
- checking whether the package can be unloaded cleanly ... [1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s] OK
- checking loading without being on the library search path ... [1s] 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 ... [7s] OK
- checking Rd files ... [0s] 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 R/sysdata.rda ... OK
- checking installed files from 'inst/doc' ... OK
- checking files in 'vignettes' ... OK
- checking examples ... [1s] OK
- checking for unstated dependencies in 'tests' ... OK
- checking tests ... [10s] ERROR
Running 'testthat.R' [10s]
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(pacta.multi.loanbook)
>
> test_check("pacta.multi.loanbook")
Saving _problems/test-2-match_loanbooks-24.R
Saving _problems/test-3-prioritise_and_diagnose-43.R
Saving _problems/test-4-analyse-30.R
Saving _problems/test-run_calculate_match_success_rate-29.R
Saving _problems/test-run_calculate_match_success_rate-64.R
Saving _problems/test-run_calculate_match_success_rate-94.R
Saving _problems/test-run_calculate_match_success_rate-132.R
Saving _problems/test-run_calculate_match_success_rate-193.R
[ FAIL 8 | WARN 0 | SKIP 0 | PASS 140 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-2-match_loanbooks.R:24:3'): with known input, runs without error ──
Expected `suppressMessages(match_loanbooks(config))` not to throw any errors.
Actually got a <simpleError> with message:
attempt access index 10/10 in VECTOR_ELT
── Error ('test-3-prioritise_and_diagnose.R:40:3'): with known input, runs without error ──
Error: 'D:\temp\2025_12_24_01_50_00_27005\RtmpaKg16h/test-data/output/matched_loanbooks/matched_lbk_raw_loanbook_1.csv' does not exist.
Backtrace:
▆
1. ├─... %>% readr::write_csv(manual_path, na = "") at test-3-prioritise_and_diagnose.R:40:3
2. ├─readr::write_csv(., manual_path, na = "")
3. │ └─readr::write_delim(...)
4. │ ├─base::stopifnot(is.data.frame(x))
5. │ └─base::is.data.frame(x)
6. ├─dplyr::slice_head(., by = id_loan)
7. ├─dplyr::slice_max(., order_by = score, by = id_loan)
8. ├─readr::read_csv(matched_path, show_col_types = FALSE)
9. │ └─vroom::vroom(...)
10. │ └─vroom:::vroom_(...)
11. └─vroom (local) `<fn>`("D:\\temp\\2025_12_24_01_50_00_27005\\RtmpaKg16h/test-data/output/matched_loanbooks/matched_lbk_raw_loanbook_1.csv")
12. └─vroom:::check_path(path)
── Failure ('test-4-analyse.R:30:3'): with known input, runs without error ─────
Expected `suppressMessages(suppressWarnings(analyse(config)))` not to throw any errors.
Actually got a <rlang_error> with message:
x No matched prioritized loan book CSVs found.
i Directory searched: 'D:\temp\2025_12_24_01_50_00_27005\RtmpaKg16h/test-data/output/prioritized_loanbooks_and_diagnostics'
i Check the `dir_prioritized_loanbooks_and_diagnostics` parameter in your 'config.yml'.
── Error ('test-run_calculate_match_success_rate.R:28:3'): combine_raw_and_matched_loan_books identifies correct matched and unmatched loans ──
Error in ``[.data.table`(matched, , `:=`(pick, none_is_one(score) | some_is_one(score)), by = id_2dii)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. ├─test_raw %>% ... at test-run_calculate_match_success_rate.R:28:3
2. └─r2dii.match::match_name(...)
3. └─r2dii.match:::match_name_impl(...)
4. ├─...[]
5. └─data.table:::`[.data.table`(...)
── Error ('test-run_calculate_match_success_rate.R:62:3'): combine_raw_and_matched_loan_books removes group_id from id_loan where needed (GH #90) ──
Error in ``[.data.table`(matched, , `:=`(pick, none_is_one(score) | some_is_one(score)), by = id_2dii)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. ├─... %>% ... at test-run_calculate_match_success_rate.R:62:3
2. ├─dplyr::mutate(., id_loan = paste(id_loan, group_id, sep = "_"))
3. └─r2dii.match::match_name(...)
4. └─r2dii.match:::match_name_impl(...)
5. ├─...[]
6. └─data.table:::`[.data.table`(...)
── Error ('test-run_calculate_match_success_rate.R:92:3'): combine_raw_and_matched_loan_books removes sector_abcd from id_loan where needed (GH #90) ──
Error in ``[.data.table`(matched, , `:=`(pick, none_is_one(score) | some_is_one(score)), by = id_2dii)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. ├─... %>% ... at test-run_calculate_match_success_rate.R:92:3
2. ├─dplyr::mutate(., id_loan = paste(id_loan, sector_abcd, sep = "_"))
3. └─r2dii.match::match_name(...)
4. └─r2dii.match:::match_name_impl(...)
5. ├─...[]
6. └─data.table:::`[.data.table`(...)
── Error ('test-run_calculate_match_success_rate.R:130:3'): calculate_match_success_rate returns results for each group of variable by_group available in matched_prioritized ──
Error in ``[.data.table`(matched, , `:=`(pick, none_is_one(score) | some_is_one(score)), by = id_2dii)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. ├─... %>% ... at test-run_calculate_match_success_rate.R:130:3
2. ├─dplyr::filter(., .data[["level"]] == "direct_loantaker")
3. └─r2dii.match::match_name(...)
4. └─r2dii.match:::match_name_impl(...)
5. ├─...[]
6. └─data.table:::`[.data.table`(...)
── Error ('test-run_calculate_match_success_rate.R:191:3'): calculate_match_success_rate can only be calculated for by_groups that are available the raw and the matched priortized loan books ──
Error in ``[.data.table`(matched, , `:=`(pick, none_is_one(score) | some_is_one(score)), by = id_2dii)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. ├─... %>% ... at test-run_calculate_match_success_rate.R:191:3
2. ├─dplyr::filter(., .data[["level"]] == "direct_loantaker")
3. └─r2dii.match::match_name(...)
4. └─r2dii.match:::match_name_impl(...)
5. ├─...[]
6. └─data.table:::`[.data.table`(...)
[ FAIL 8 | WARN 0 | SKIP 0 | PASS 140 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [24s] OK
- checking PDF version of manual ... [19s] OK
- checking HTML version of manual ... [1s] OK
- DONE
Status: 1 ERROR