tab_header_lbl {RTLknitr} | R Documentation |
This function enhances the gt package's tab_header function by allowing the inclusion of a label for referencing the table in LaTeX documents.
tab_header_lbl(data, title, subtitle = NULL, label = NULL)
data |
A gt table object. |
title |
Title of the table. |
subtitle |
Subtitle of the table. |
label |
Label for referencing the table in LaTeX. |
Be sure to use this function at the end of gt format functions. This function returns a LaTeX-formatted table header.
LaTeX-formatted table header.
require(gt)
head(iris) |> gt() |> tab_header_lbl(title = "iris",label = "tab:iris") |> cat()