From 3fc0820792b2b2a008321e6e89813a71fff87014 Mon Sep 17 00:00:00 2001 From: roninsightrx Date: Thu, 7 Mar 2024 08:56:53 -0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Jasmine Hughes <43552465+jasmineirx@users.noreply.github.com> --- tests/testthat/test_calc_auc_analytic.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test_calc_auc_analytic.R b/tests/testthat/test_calc_auc_analytic.R index 3560d09..e1eb2a1 100644 --- a/tests/testthat/test_calc_auc_analytic.R +++ b/tests/testthat/test_calc_auc_analytic.R @@ -17,10 +17,10 @@ if(run_ref) { regimen = reg, covariates = covs, t_obs = t_obs - ) %>% - dplyr::filter(comp == attr(mod, "size")) %>% - dplyr::mutate(auc = round(c(0, diff(y)), 3)) %>% - select(t, auc) + ) + res <- res[res$comp == attr(mod, "size")) + res$auc <- round(c(0, diff(res$y)), 3) + res <- res[, c("t", "auc")] par_eff <- PKPDsim::calculate_parameters(mod, parameters = par, covariates = covs) parameters = list(CL = par_eff$CLi, V = par_eff$Vi, Q = par_eff$Qi, V2 = par_eff$V2i) } else {