If a row group X only has a single unique value in one of its rowname_col (with 2+ rowname_cols), the label for X will merge into the values of the preceding row group. Also, the group after X will merge into X's values
# Row group D only has `1` for rowname_col `symbol`
sample_data <- tibble::tibble(
subject = c(rep("A", 3), rep("B", 4), rep("C", 2), rep("D", 2), rep("E", 3)),
symbol = c(
1,
1,
2,
1,
1,
2,
2,
1,
1,
1,
2,
2,
2,
1
),
value = runif(14),
v2 = runif(14)
)
gt::gt(
sample_data,
rowname_col = c("symbol", "value"),
groupname_col = "subject"
)
Row group "D" shouldn't merge into the values of "C" and "E" shouldn't merge into the values of group "D".
Prework
Description
If a row group X only has a single unique value in one of its rowname_col (with 2+ rowname_cols), the label for X will merge into the values of the preceding row group. Also, the group after X will merge into X's values
Reproducible example
Expected result
Row group "D" shouldn't merge into the values of "C" and "E" shouldn't merge into the values of group "D".
Session info
Created on 2026-01-28 with reprex v2.1.1
Session info