Skip to content

Commit

Permalink
filter x2 instead of the original x because x2 has the correct column…
Browse files Browse the repository at this point in the history
… names (renamed from x)
  • Loading branch information
yihui committed Jan 11, 2025
1 parent 9053f2c commit 5214d91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/as_gt.R
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ gsd_parts <- function(
x = arrange(x2, Analysis),
title = title, subtitle = subtitle,
footnote = footnote %||% gsd_footnote(method, columns),
alpha = max(filter(x, Bound == bound[1])[[alpha_column]])
alpha = max(filter(x2, Bound == bound[1])[[alpha_column]])
)
}

Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-independent_as_gt.R
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ test_that("Snapshot test for gs_power_wlr summary as_gt with colname_spanner and
as_gt(
colname_spanner = "Cumulative probability to cross boundaries",
colname_spannersub = c("under H1", "under H0")
) %>%
suppressWarnings() # Can be removed after <https://github.com/Merck/gsDesign2/issues/339> is fixed
)

local_edition(3)
expect_snapshot_output(gt_to_latex(output))
Expand Down

0 comments on commit 5214d91

Please sign in to comment.