rm_stubhead()
Using the gtcars dataset, we’ll create a gt table. With tab_stubhead(), it’s possible to add a stubhead label. This appears in the top-left and can be used to describe what is in the stub.
gtcars
tab_stubhead()
gt_tbl <- gtcars |> dplyr::select(model, year, hp, trq) |> dplyr::slice(1:5) |> gt(rowname_col = "model") |> tab_stubhead(label = "car") gt_tbl
If you decide that you don’t want the stubhead label in the gt_tbl object, it can be removed with rm_stubhead().
gt_tbl
rm_stubhead(data = gt_tbl)