# NOT RUN {
# 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)
tab_1 <-
  gtcars %>%
  dplyr::select(model, starts_with("mpg")) %>%
  dplyr::slice(1:8) %>%
  gt() %>%
  cols_merge_range(
    col_begin = vars(mpg_c),
    col_end = vars(mpg_h)
  ) %>%
  cols_label(
    mpg_c = md("*MPG*")
  )
# }
Run the code above in your browser using DataLab