row_group_order()
Let’s use exibble to create a gt table with a stub and with row groups. We can modify the order of the row groups with row_group_order(), specifying the new ordering in groups.
exibble
groups
exibble |> dplyr::select(char, currency, row, group) |> gt( rowname_col = "row", groupname_col = "group" ) |> row_group_order(groups = c("grp_b", "grp_a"))