From 234c9059a95e104917e488a6ddd2313234a96cdc Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 11 May 2020 05:15:19 +0200 Subject: Avoid merge() and data.frame() in cost function also for deSolve and eigenvalue based solutions. This noticeably increases performance for these methods, see test.log and benchmark vignette. --- tests/testthat/test_plots_summary_twa.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/testthat/test_plots_summary_twa.R') diff --git a/tests/testthat/test_plots_summary_twa.R b/tests/testthat/test_plots_summary_twa.R index 13d1dd0f..bc3d29a8 100644 --- a/tests/testthat/test_plots_summary_twa.R +++ b/tests/testthat/test_plots_summary_twa.R @@ -13,7 +13,7 @@ test_that("Time weighted average concentrations are correct", { odeparms = bpar[2:length(bpar)], odeini = c(parent = bpar[[1]]), outtimes = outtimes_10) - twa_num <- mean(pred_10$parent) + twa_num <- mean(pred_10[, "parent"]) names(twa_num) <- 10 twa_ana <- max_twa_parent(fit, 10) -- cgit v1.2.1