- using R Under development (unstable) (2025-12-23 r89222)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-15 (Debian 15.2.0-11) 15.2.0
GNU Fortran (Debian 15.2.0-11) 15.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘polypharmacy/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘polypharmacy’ version ‘1.0.0’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [2s/2s] OK
- 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 executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘polypharmacy’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... 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 ... [0s/0s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the package can be unloaded cleanly ... [0s/0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the namespace can be unloaded cleanly ... [0s/0s] OK
- checking loading without being on the library search path ... [0s/0s] 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 ... [5s/6s] OK
- checking Rd files ... [0s/1s] NOTE
checkRd: (-1) stat_quantile_prob.Rd:14: Lost braces; missing escapes or markup?
14 | Number {25, 50, 75}
| ^
- checking Rd metadata ... OK
- checking Rd line widths ... 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/0s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking R/sysdata.rda ... OK
- checking examples ... [1s/1s] ERROR
Running examples in ‘polypharmacy-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ind_simult
> ### Title: Assess polypharmacy based on the daily simultaneous consumption
> ### of medications
> ### Aliases: ind_simult
>
> ### ** Examples
>
> rx1 <- data.frame(id = c(1, 1, 2),
+ code = c("A", "B", "A"),
+ date = c("2000-01-01", "2000-01-04", "2000-01-08"),
+ duration = c(5, 7, 5))
> cohort1 <- data.frame(id = as.numeric(1:3),
+ age = c(45, 12, 89),
+ sex = c("F", "F", "M"))
> rx_proc1 <- data_process(Rx_deliv = rx1, Rx_id = "id", Rx_drug_code = "code",
+ Rx_drug_deliv = "date", Rx_deliv_dur = "duration",
+ Cohort = cohort1, Cohort_id = "id",
+ study_start = "2000-01-01", study_end = "2000-01-15",
+ cores = 1)
Error in `[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, :
attempt access index 6/6 in VECTOR_ELT
Calls: data_process -> data_process.1_core -> [ -> [.data.table
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [3s/4s] ERROR
Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(polypharmacy)
>
> test_check("polypharmacy")
Attaching package: 'data.table'
The following object is masked from 'package:base':
%notin%
Saving _problems/test-data_process-87.R
Saving _problems/test-data_process-119.R
Saving _problems/test-data_process-146.R
Saving _problems/test-data_process-167.R
Saving _problems/test-data_process-221.R
Saving _problems/test-data_process-259.R
Saving _problems/test-data_process-292.R
Saving _problems/test-data_process-336.R
Saving _problems/test-data_process-388.R
Saving _problems/test-ind_simult-17.R
Saving _problems/test-ind_stdcontinuous-13.R
Saving _problems/test-ind_stdcumul-17.R
Saving _problems/test-ind_ucontinuous-17.R
Saving _problems/test-ind_wcumul-17.R
[ FAIL 14 | WARN 0 | SKIP 0 | PASS 18 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-data_process.R:68:3'): data_process.hosp_stays ─────────────────
Error in ``[.data.table`(Rx_deliv, sunique(c(idx, idx + 1)), `:=`(by_hosp, cumsum(hosp)), .(id, drug_code))`: attempt access index 7/7 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:68:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─...[]
7. └─data.table:::`[.data.table`(...)
── Error ('test-data_process.R:102:3'): data_process.hosp_stays_many ───────────
Error in ``[.data.table`(Hosp_stays, idx, `:=`(diff, tx_start - shift(tx_end)), .(id))`: attempt access index 3/3 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:102:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─Hosp_stays[idx, `:=`(diff, tx_start - shift(tx_end)), .(id)]
7. └─data.table:::`[.data.table`(...)
── Error ('test-data_process.R:133:3'): data_process.hosp_stays_more_many ──────
Error in ``[.data.table`(Hosp_stays, idx, `:=`(diff, tx_start - shift(tx_end)), .(id))`: attempt access index 3/3 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:133:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─Hosp_stays[idx, `:=`(diff, tx_start - shift(tx_end)), .(id)]
7. └─data.table:::`[.data.table`(...)
── Error ('test-data_process.R:157:3'): data_process.study_dates ───────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:157:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─...[]
7. └─data.table:::`[.data.table`(...)
── Error ('test-data_process.R:209:3'): data_process.grace_factr ───────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:209:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─...[]
7. └─data.table:::`[.data.table`(...)
── Error ('test-data_process.R:250:3'): data_process.grace_cst ─────────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:250:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─...[]
7. └─data.table:::`[.data.table`(...)
── Error ('test-data_process.R:283:3'): data_process.grace_fctr_cst ────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:283:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─...[]
7. └─data.table:::`[.data.table`(...)
── Error ('test-data_process.R:324:3'): data_process.max_reserve ───────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:324:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─...[]
7. └─data.table:::`[.data.table`(...)
── Error ('test-data_process.R:375:3'): data_process.hospit_grace ──────────────
Error in ``[.data.table`(Hosp_stays, idx, `:=`(diff, tx_start - shift(tx_end)), .(id))`: attempt access index 3/3 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-data_process.R:375:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─polypharmacy::data_process(...)
5. └─polypharmacy::data_process.1_core(...)
6. ├─Hosp_stays[idx, `:=`(diff, tx_start - shift(tx_end)), .(id)]
7. └─data.table:::`[.data.table`(...)
── Error ('test-ind_simult.R:13:3'): ind_simult ────────────────────────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. └─polypharmacy::data_process(...) at test-ind_simult.R:13:3
2. └─polypharmacy::data_process.1_core(...)
3. ├─...[]
4. └─data.table:::`[.data.table`(...)
── Error ('test-ind_stdcontinuous.R:9:3'): ind_stdcontinuous ───────────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. └─polypharmacy::data_process(...) at test-ind_stdcontinuous.R:9:3
2. └─polypharmacy::data_process.1_core(...)
3. ├─...[]
4. └─data.table:::`[.data.table`(...)
── Error ('test-ind_stdcumul.R:13:3'): ind_stdcumul ────────────────────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. └─polypharmacy::data_process(...) at test-ind_stdcumul.R:13:3
2. └─polypharmacy::data_process.1_core(...)
3. ├─...[]
4. └─data.table:::`[.data.table`(...)
── Error ('test-ind_ucontinuous.R:13:3'): ind_ucontinuous ──────────────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. └─polypharmacy::data_process(...) at test-ind_ucontinuous.R:13:3
2. └─polypharmacy::data_process.1_core(...)
3. ├─...[]
4. └─data.table:::`[.data.table`(...)
── Error ('test-ind_wcumul.R:13:3'): ind_wcumul ────────────────────────────────
Error in ``[.data.table`(Rx_deliv, Rx_deliv[, .I[.N > 1], .(id, drug_code)]$V1, `:=`(diff, tx_start - shift(tx_end) - 1L), .(id, drug_code))`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. └─polypharmacy::data_process(...) at test-ind_wcumul.R:13:3
2. └─polypharmacy::data_process.1_core(...)
3. ├─...[]
4. └─data.table:::`[.data.table`(...)
[ FAIL 14 | WARN 0 | SKIP 0 | PASS 18 ]
Error:
! Test failures.
Execution halted
- checking PDF version of manual ... [4s/5s] OK
- checking HTML version of manual ... [2s/3s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs, 1 NOTE