R Under development (unstable) (2025-08-25 r88702 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # 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/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(invivoPKfit) ✔ invivoPKfit v2.0.2 has been successfully loaded! ℹ For help, please run: help('invivoPKfit') > > test_check("invivoPKfit") AAFE.pk(): Predicted conc below pLOQ substituted with pLOQ AAFE.pk(): Groups: Chemical, Species, method, and model v Absolute Average Fold Error Calculated! AAFE.pk(): Predicted conc below pLOQ substituted with pLOQ AAFE.pk(): Groups: Chemical, Species, method, and model v Absolute Average Fold Error Calculated! AFE.pk(): Predicted conc below pLOQ substituted with pLOQ AFE.pk(): Groups: Chemical, Species, method, and model v Average Fold Error Calculated! AFE.pk(): Predicted conc below pLOQ substituted with pLOQ AFE.pk(): Groups: Chemical, Species, method, and model v Average Fold Error Calculated! Joining with `by = join_by(model, method, DATA_GROUP_ID, Chemical, Species, param_name)` cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! cp_httk_gas_pbtk: An error in httk::solve_gas_pbtk() has occured. Please check output of this operation! v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] v Setting kelim and kgutabs to be optimized for model_1comp v Setting kelim to be optimized for model_1comp v Setting kelim, Vdist, Fgutabs, kgutabs, and Rblood2plasma to be optimized for model_1comp i Setting conc_fun_args to FALSE i Setting auc_fun_args to FALSE i Setting params_fun_args to FALSE i Setting tkstats_fun_args to FALSE i 4 model arguments were changed. i Setting auc_fun_args to FALSE i Setting params_fun_args to FALSE i Setting tkstats_fun_args to FALSE i 4 model arguments were changed. i no model arguments were changed. v Setting kelim, Vdist, and Fgutabs to be optimized for model_1comp v Setting kelim and kgutabs to be optimized for model_1comp Changing `model$name` from model_1comp to test_model_1comp stat_model(c("model_flat", "test_model_1comp")): stat_model already present; new stat_model will replace the existing one. Old models: model_flat, model_1comp, model_2comp New models: model_flat, test_model_1comp do_preprocess.pk(): Pre-processing data Species, Route, and Media will be coerced to lowercase. v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] 563 concentration vs time observations loaded. Number of unique data groups (unique combinations of Chemical and Species): 2 If LOQ < 0, replacing LOQ with NA. i 563 LOQs were be replaced with NA. If Value_SD <= 0, replacing Value_SD with NA. i 563 Value_SDs were be replaced with NA. Estimating 563 missing LOQs as 0.9 * minimum non-NA, non-zero Value for each unique combination of Chemical, Species, Reference, and Media N_Subjects is 1 for 563 observations. i Value_SD will be set to 0 for these observations. Remaining observations: 563 Number of unique data groups (unique combinations of Chemical and Species): 2 Applying transformations to concentration variables: dose_norm = FALSE log10_trans = FALSE do_data_info.pk(): Getting data summary info. do_data_info.pk(): Getting data summary statistics. do_data_info.pk(): Doing dose-normalized non-compartmental analysis. nca.pk(): Doing dose-normalized NCA by the following groupings: Chemical, Species, Reference, Route, Media, and Dose do_data_info.pk(): Getting data flags based on NCA. do_prefit.pk(): Assigning error SD groups to all observations do_prefit.pk(): Getting bounds and starting guesses for each error SD to be fitted do_prefit.pk(): Getting bounds and starting guesses for all model parameters to be fitted do_prefit.pk(): Checking whether sufficient observations to fit models. do_prefit.pk(): Checking whether sufficient observations to fit models. do_fit.pk(): Begin fitting for models: model_flat and test_model_1comp Fitting... ======================>-------- 3/4 [5.4s] Fitting... ==============================> 4/4 [6.8s] do_fit.pk(): Now converting all rate constant estimates to units of 1/hour, in case time has been scaled to units other than hours before fitting. v do_fit.pk(): Fitting complete! v Setting Kgut2pu, Krbc2pu, Kkidney2pu, Klung2pu, Kmuc2air, Kliver2pu, Krest2pu, and Kblood2air to be optimized for model_httk_gas_pbtk Changing `model$name` from model_httk_gas_pbtk to test_model_gas stat_model(c("model_flat", "model_httk_gas_pbtk", "test_model_gas")): stat_model already present; new stat_model will replace the existing one. Old models: model_flat, model_1comp, model_2comp New models: model_flat, model_httk_gas_pbtk, test_model_gas do_preprocess.pk(): Pre-processing data Species, Route, and Media will be coerced to lowercase. v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] 38 concentration vs time observations loaded. Number of unique data groups (unique combinations of Chemical and Species): 2 If LOQ < 0, replacing LOQ with NA. i 38 LOQs were be replaced with NA. If Value_SD <= 0, replacing Value_SD with NA. i 38 Value_SDs were be replaced with NA. Estimating 38 missing LOQs as 0.9 * minimum non-NA, non-zero Value for each unique combination of Chemical, Species, Reference, and Media Estimating missing concentration SDs for data points with N_Subjects > 1 as minimum non-missing SD for each group of data given by the unique combination of variables Chemical, Species, Reference, and Media . If all SDs are missing in a group, SD for each observation will be imputed as 0. i 38 missing SDs will be estimated. Remaining observations: 38 Number of unique data groups (unique combinations of Chemical and Species): 2 Applying transformations to concentration variables: dose_norm = FALSE log10_trans = FALSE do_data_info.pk(): Getting data summary info. do_data_info.pk(): Getting data summary statistics. do_data_info.pk(): Doing dose-normalized non-compartmental analysis. nca.pk(): Doing dose-normalized NCA by the following groupings: Chemical, Species, Reference, Route, Media, and Dose do_data_info.pk(): Getting data flags based on NCA. do_prefit.pk(): Assigning error SD groups to all observations do_prefit.pk(): Getting bounds and starting guesses for each error SD to be fitted do_prefit.pk(): Getting bounds and starting guesses for all model parameters to be fitted do_prefit.pk(): Checking whether sufficient observations to fit models. do_prefit.pk(): Checking whether sufficient observations to fit models. do_prefit.pk(): Checking whether sufficient observations to fit models. do_fit.pk(): Begin fitting for models: model_flat, model_httk_gas_pbtk, and test_model_gas Fitting... ==========>-------------------- 2/6 [6.6s] Fitting... ===============>--------------- 3/6 [36.7s] Fitting... =========================>----- 5/6 [42.4s] Fitting... ==============================> 6/6 [1m 20.9s] do_fit.pk(): Now converting all rate constant estimates to units of 1/hour, in case time has been scaled to units other than hours before fitting. v do_fit.pk(): Fitting complete! settings_preprocess(suppress.messages = TRUE): settings_preprocess already present; new settings_preprocess will replace the existing one v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] do_fit.pk(): Begin fitting for models: model_flat, model_1comp, and model_2comp Fitting... =====>------------------------- 1/6 [5.2s] Fitting... ==========>-------------------- 2/6 [21.5s] Fitting... ===============>--------------- 3/6 [41.3s] Fitting... ==============================> 6/6 [56.2s] do_fit.pk(): Now converting all rate constant estimates to units of 1/hour, in case time has been scaled to units other than hours before fitting. v do_fit.pk(): Fitting complete! settings_preprocess(suppress.messages = TRUE): settings_preprocess already present; new settings_preprocess will replace the existing one v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] do_fit.pk(): Begin fitting for models: model_flat, model_1comp, and model_2comp Fitting... ===============>--------------- 3/6 [5.6s] Fitting... =========================>----- 5/6 [7.7s] Fitting... ==============================> 6/6 [9.1s] do_fit.pk(): Now converting all rate constant estimates to units of 1/hour, in case time has been scaled to units other than hours before fitting. v do_fit.pk(): Fitting complete! stat_model(model = c("model_flat", "model_1comp", "model_2comp", "model_httk_gas_pbtk")): stat_model already present; new stat_model will replace the existing one. Old models: model_flat, model_1comp, model_2comp New models: model_flat, model_1comp, model_2comp, model_httk_gas_pbtk settings_preprocess(suppress.messages = TRUE): settings_preprocess already present; new settings_preprocess will replace the existing one v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] do_fit.pk(): Begin fitting for models: model_flat, model_1comp, model_2comp, and model_httk_gas_pbtk Fitting... ========>---------------------- 2/8 [1.7s] Fitting... ===============>--------------- 4/8 [10.6s] Fitting... ======================>-------- 6/8 [16.3s] Fitting... ==========================>---- 7/8 [22.3s] Fitting... ==============================> 8/8 [27.4s] do_fit.pk(): Now converting all rate constant estimates to units of 1/hour, in case time has been scaled to units other than hours before fitting. v do_fit.pk(): Fitting complete! settings_preprocess(suppress.messages = TRUE): settings_preprocess already present; new settings_preprocess will replace the existing one v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] settings_preprocess(suppress.messages = TRUE): settings_preprocess already present; new settings_preprocess will replace the existing one settings_preprocess(suppress.messages = TRUE): settings_preprocess already present; new settings_preprocess will replace the existing one v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] settings_preprocess(suppress.messages = TRUE): settings_preprocess already present; new settings_preprocess will replace the existing one v Current Modeling Structure: Data Group: [Chemical--Species] \- + Error Group: [Reference] \- + Summary Group: [Route--Media--Dose] [ FAIL 0 | WARN 0 | SKIP 0 | PASS 102 ] > > proc.time() user system elapsed 266.64 12.29 279.18