The tab_stubhead() function

Use gtcars to create a gt table. With tab_stubhead() we can add a stubhead label. This appears in the top-left and can be used to describe what is in the stub.

gtcars |>
  dplyr::select(model, year, hp, trq) |>
  dplyr::slice(1:5) |>
  gt(rowname_col = "model") |>
  tab_stubhead(label = "car")
car year hp trq
GT 2017 647 550
458 Speciale 2015 597 398
458 Spider 2015 562 398
458 Italia 2014 562 398
488 GTB 2016 661 561