CRAN Package Check Results for Maintainer ‘Cyril Leven <cyril.leven at chu-brest.fr>’

Last updated on 2025-12-28 03:52:00 CET.

Package ERROR OK
posologyr 1 12

Package posologyr

Current CRAN status: ERROR: 1, OK: 12

Version: 1.2.8
Check: examples
Result: ERROR Running examples in 'posologyr-Ex.R' failed The error most likely occurred in: > ### Name: poso_dose_auc > ### Title: Estimate the dose needed to reach a target area under the > ### concentration-time curve (AUC) > ### Aliases: poso_dose_auc > > ### ** Examples > > rxode2::setRxThreads(2L) # limit the number of threads > > # model > mod_run001 <- function() { + ini({ + THETA_Cl <- 4.0 + THETA_Vc <- 70.0 + THETA_Ka <- 1.0 + ETA_Cl ~ 0.2 + ETA_Vc ~ 0.2 + ETA_Ka ~ 0.2 + prop.sd <- sqrt(0.05) + }) + model({ + TVCl <- THETA_Cl + TVVc <- THETA_Vc + TVKa <- THETA_Ka + + Cl <- TVCl*exp(ETA_Cl) + Vc <- TVVc*exp(ETA_Vc) + Ka <- TVKa*exp(ETA_Ka) + + K20 <- Cl/Vc + Cc <- centr/Vc + + d/dt(depot) = -Ka*depot + d/dt(centr) = Ka*depot - K20*centr + Cc ~ prop(prop.sd) + }) + } > # df_patient01: event table for Patient01, following a 30 minutes intravenous > # infusion > df_patient01 <- data.frame(ID=1, + TIME=c(0.0,1.0,14.0), + DV=c(NA,25.0,5.5), + AMT=c(2000,0,0), + EVID=c(1,0,0), + DUR=c(0.5,NA,NA)) > # estimate the optimal dose to reach an AUC(0-12h) of 45 h.mg/l > poso_dose_auc(dat=df_patient01,prior_model=mod_run001, + time_auc=12,target_auc=45) ℹ parameter labels from comments are typically ignored in non-interactive mode ℹ Need to run with the source intact to parse comments Error in `[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), : attempt access index 16/16 in VECTOR_ELT Calls: poso_dose_auc ... init_eta -> residual_error_all_endpoints -> [ -> [.data.table Execution halted Flavor: r-devel-windows-x86_64

Version: 1.2.8
Check: tests
Result: ERROR Running 'testthat.R' [49s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(rxode2) rxode2 5.0.1 using 2 threads (see ?getRxThreads) no cache: create with `rxCreateCache()` > library(posologyr) > library(testthat) > setRxThreads(2L) #for CRAN, following the advice of mattfidler > > test_check("posologyr") Saving _problems/test_doseoptim-108.R Saving _problems/test_doseoptim-218.R Saving _problems/test_doseoptim_cmt-60.R Saving _problems/test_doseoptim_tdm-53.R Saving _problems/test_doseoptim_tdm-82.R Saving _problems/test_doseoptim_tdm-112.R Saving _problems/test_issue_10-41.R Saving _problems/test_issue_10-49.R Saving _problems/test_issue_28-60.R Saving _problems/test_issue_29-53.R Saving _problems/test_issue_30-50.R Saving _problems/test_issue_32-60.R Saving _problems/test_issue_52-37.R Saving _problems/test_map_iov-64.R Saving _problems/test_map_mlx-78.R Saving _problems/test_map_nlmixr-42.R Saving _problems/test_map_nm-51.R Saving _problems/test_rxui-39.R [ FAIL 18 | WARN 0 | SKIP 4 | PASS 10 ] ══ Skipped tests (4) ═══════════════════════════════════════════════════════════ • On CRAN (2): 'test_rxui.R:48:3', 'test_rxui.R:128:3' • empty test (2): , ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test_doseoptim.R:97:3'): Same optimal dose with or without providing MAP estimates ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_doseoptim.R:97:3 2. │ └─testthat::quasi_label(enquo(expected), expected.label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_dose_conc(...) 5. └─posologyr:::read_optim_distribution_input(...) 6. └─posologyr::poso_estim_map(dat, prior_model, nocb = nocb, return_model = TRUE) 7. └─posologyr:::init_eta(...) 8. └─posologyr:::residual_error_all_endpoints(...) 9. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 10. └─data.table:::`[.data.table`(...) ── Error ('test_doseoptim.R:211:3'): Optimization results do not deviate from known values for multiple dose regimen ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 22/22 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_doseoptim.R:211:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_time_cmin(...) 5. └─posologyr:::read_optim_distribution_input(...) 6. └─posologyr::poso_estim_map(dat, prior_model, nocb = nocb, return_model = TRUE) 7. └─posologyr:::init_eta(...) 8. └─posologyr:::residual_error_all_endpoints(...) 9. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 10. └─data.table:::`[.data.table`(...) ── Error ('test_doseoptim_cmt.R:57:3'): Optimal dose can be estimated for dosing in any compartment ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 26/26 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_doseoptim_cmt.R:57:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_dose_conc(...) 5. └─posologyr::poso_estim_map(...) 6. └─posologyr:::init_eta(...) 7. └─posologyr:::residual_error_all_endpoints(...) 8. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 9. └─data.table:::`[.data.table`(...) ── Error ('test_doseoptim_tdm.R:49:3'): Optimization results do not deviate from known values following TDM events when the last time is a float number ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 23/23 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_doseoptim_tdm.R:49:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_time_cmin(...) 5. └─posologyr::poso_estim_map(...) 6. └─posologyr:::init_eta(...) 7. └─posologyr:::residual_error_all_endpoints(...) 8. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 9. └─data.table:::`[.data.table`(...) ── Error ('test_doseoptim_tdm.R:78:13'): Optimization results do not deviate from known values following TDM events when the last time is an integer ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 23/23 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_doseoptim_tdm.R:78:13 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_time_cmin(...) 5. └─posologyr::poso_estim_map(...) 6. └─posologyr:::init_eta(...) 7. └─posologyr:::residual_error_all_endpoints(...) 8. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 9. └─data.table:::`[.data.table`(...) ── Error ('test_doseoptim_tdm.R:109:13'): The functions issue a warning when parameters are ignored because TDM=true ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 23/23 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test_doseoptim_tdm.R:109:13 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. └─posologyr::poso_time_cmin(...) 8. └─posologyr::poso_estim_map(...) 9. └─posologyr:::init_eta(...) 10. └─posologyr:::residual_error_all_endpoints(...) 11. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 12. └─data.table:::`[.data.table`(...) ── Error ('test_issue_10.R:38:3'): poso_mcmc_pop accepts burn_in == n_iter ───── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 2/2 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_issue_10.R:38:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_estim_mcmc(...) 5. └─base::lapply(...) 6. └─posologyr (local) FUN(X[[i]], ...) 7. └─posologyr:::residual_error_all_endpoints(...) 8. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 9. └─data.table:::`[.data.table`(...) ── Error ('test_issue_10.R:45:3'): poso_mcmc_pop accepts burn_in < n_iter ────── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 2/2 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_issue_10.R:45:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_estim_mcmc(...) 5. └─base::lapply(...) 6. └─posologyr (local) FUN(X[[i]], ...) 7. └─posologyr:::residual_error_all_endpoints(...) 8. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 9. └─data.table:::`[.data.table`(...) ── Error ('test_issue_28.R:56:3'): poso_estim_map provides estimates even when predicted concentrations are zero ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 17/17 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_issue_28.R:56:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_estim_map(...) 5. └─posologyr:::init_eta(...) 6. └─posologyr:::residual_error_all_endpoints(...) 7. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 8. └─data.table:::`[.data.table`(...) ── Error ('test_issue_29.R:49:3'): poso_estim_map provides estimates even when the IIV is zero ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 16/16 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_issue_29.R:49:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_estim_map(...) 5. └─posologyr:::init_eta(...) 6. └─posologyr:::residual_error_all_endpoints(...) 7. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 8. └─data.table:::`[.data.table`(...) ── Error ('test_issue_30.R:50:1'): (code run outside of `test_that()`) ───────── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 22/22 in VECTOR_ELT Backtrace: ▆ 1. └─posologyr::poso_estim_map(df_patientA_tdm, mod_MTXHD_joerger2011) at test_issue_30.R:50:1 2. └─posologyr:::init_eta(...) 3. └─posologyr:::residual_error_all_endpoints(...) 4. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 5. └─data.table:::`[.data.table`(...) ── Error ('test_issue_32.R:55:3'): Dosing optim functions can use models with IOV ── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 26/26 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_issue_32.R:55:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─posologyr::poso_time_cmin(...) 5. └─posologyr:::read_optim_distribution_input(...) 6. └─posologyr::poso_estim_map(dat, prior_model, nocb = nocb, return_model = TRUE) 7. └─posologyr:::init_eta(...) 8. └─posologyr:::residual_error_all_endpoints(...) 9. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 10. └─data.table:::`[.data.table`(...) ── Error ('test_issue_52.R:37:3'): single IIV ────────────────────────────────── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 16/16 in VECTOR_ELT Backtrace: ▆ 1. └─posologyr::poso_estim_map(patient_data, mod_run001) at test_issue_52.R:37:3 2. └─posologyr:::init_eta(...) 3. └─posologyr:::residual_error_all_endpoints(...) 4. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 5. └─data.table:::`[.data.table`(...) ── Error ('test_map_iov.R:62:1'): (code run outside of `test_that()`) ────────── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 26/26 in VECTOR_ELT Backtrace: ▆ 1. └─posologyr::poso_estim_map(...) at test_map_iov.R:62:1 2. └─posologyr:::init_eta(...) 3. └─posologyr:::residual_error_all_endpoints(...) 4. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 5. └─data.table:::`[.data.table`(...) ── Error ('test_map_mlx.R:76:1'): (code run outside of `test_that()`) ────────── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. └─posologyr::poso_estim_map(...) at test_map_mlx.R:76:1 2. └─posologyr:::init_eta(...) 3. └─posologyr:::residual_error_all_endpoints(...) 4. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 5. └─data.table:::`[.data.table`(...) ── Error ('test_map_nlmixr.R:40:1'): (code run outside of `test_that()`) ─────── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 22/22 in VECTOR_ELT Backtrace: ▆ 1. └─posologyr::poso_estim_map(...) at test_map_nlmixr.R:40:1 2. └─posologyr:::init_eta(...) 3. └─posologyr:::residual_error_all_endpoints(...) 4. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 5. └─data.table:::`[.data.table`(...) ── Error ('test_map_nm.R:49:1'): (code run outside of `test_that()`) ─────────── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 17/17 in VECTOR_ELT Backtrace: ▆ 1. └─posologyr::poso_estim_map(...) at test_map_nm.R:49:1 2. └─posologyr:::init_eta(...) 3. └─posologyr:::residual_error_all_endpoints(...) 4. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 5. └─data.table:::`[.data.table`(...) ── Error ('test_rxui.R:39:3'): readme model equivalent ───────────────────────── Error in ``[.data.table`(f_all_endpoints, , `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints)))`: attempt access index 16/16 in VECTOR_ELT Backtrace: ▆ 1. └─posologyr::poso_estim_map(patient_data, mod_run001) at test_rxui.R:39:3 2. └─posologyr:::init_eta(...) 3. └─posologyr:::residual_error_all_endpoints(...) 4. ├─f_all_endpoints[, `:=`(f, get(as.character(DVID))), by = seq_len(nrow(f_all_endpoints))] 5. └─data.table:::`[.data.table`(...) [ FAIL 18 | WARN 0 | SKIP 4 | PASS 10 ] 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.