I want to add a thicker (px(2)
) vertical line between each of the spanner columns that runs throughout the figure. I have looked through the tab_options
and have not found a combination that allows for the line to go through all of the table at the column spanner locations. I am using the gt
package.
Here is some example data:
gtcars %>%
dplyr::select(
-mfr, -trim, bdy_style, drivetrain,
-drivetrain, -trsmn, -ctry_origin
) %>%
dplyr::slice(1:8) %>%
gt(rowname_col = "model") %>%
tab_spanner(
label = "performance",
columns = c(
hp, hp_rpm, trq, trq_rpm,
mpg_c, mpg_h
)
)
In this data, I would like the vertical line on either side of year, bdy_style, performance, and msrp.
Thanks!