From 9756aa177eefd5557272795d19d4dd768d7ccab3 Mon Sep 17 00:00:00 2001 From: Gavin Simpson Date: Tue, 14 May 2024 19:07:57 +0200 Subject: [PATCH] messed up the shift argumen --- R/confint-methods.R | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/R/confint-methods.R b/R/confint-methods.R index f0d5eaf9f..66fe0d904 100644 --- a/R/confint-methods.R +++ b/R/confint-methods.R @@ -414,9 +414,15 @@ # class(out) <- class(out)[-(1:2)] ## using se and crit, compute the lower and upper intervals - out <- add_column(out, - .lower_ci = out$.estimate - (out$.crit * out$.se), - .upper_ci = out$.estimate + (out$.crit * out$.se) + # out <- add_column(out, + # .lower_ci = out$.estimate - (out$.crit * out$.se), + # .upper_ci = out$.estimate + (out$.crit * out$.se) + # ) + + out <- mutate(out, + .estimate = .data$.estimate + const, + .lower_ci = .data$.estimate - (.data$.crit * .data$.se), + .upper_ci = .data$.estimate + (.data$.crit * .data$.se) ) ## transform @@ -428,8 +434,7 @@ # smooth_estimates has columns in different places, relocate them to match # old output as much as possible out <- relocate(out, all_of(c( - ".estimate", ".se", ".crit", ".lower_ci", - ".upper_ci" + ".estimate", ".se", ".crit", ".lower_ci", ".upper_ci" )), .after = last_col()) ## prepare for return