cols_merge_range()
Use gtcars to create a gt table, keeping only the model, mpg_c, and mpg_h columns. Merge the "mpg*" columns together as a single range column (which is labeled as MPG, in italics) using the cols_merge_range() function.
gtcars
model
mpg_c
mpg_h
"mpg*"
gtcars |> dplyr::select(model, starts_with("mpg")) |> dplyr::slice(1:8) |> gt() |> cols_merge_range( col_begin = mpg_c, col_end = mpg_h ) |> cols_label(mpg_c = md("*MPG*"))