Add label text to the stubhead
Add a label to the stubhead of a gt table. The stubhead is the lone element that is positioned left of the column labels, and above the stub. If a stub does not exist, then there is no stubhead (so no change will be made when using this function in that case). We have the flexibility to use Markdown formatting for the stubhead label. Furthermore, if the table is intended for HTML output, we can use HTML for the stubhead label.
tab_stubhead(data, label)
An object of class gt_tbl
.
2-5
Other Create or Modify Parts:
tab_footnote()
,
tab_header()
,
tab_options()
,
tab_row_group()
,
tab_source_note()
,
tab_spanner_delim()
,
tab_spanner()
,
tab_style()
# Use `gtcars` to create a gt table; add # a stubhead label to describe what is # in the stub tab_1 <- gtcars %>% dplyr::select(model, year, hp, trq) %>% dplyr::slice(1:5) %>% gt(rowname_col = "model") %>% tab_stubhead(label = "car")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.