tab_header_lbl {RTLknitr} | R Documentation |
Create a Labeled Header for gt Tables
Description
This function enhances the gt package's tab_header function by allowing the inclusion of a label for referencing the table in LaTeX documents.
Usage
tab_header_lbl(data, title, subtitle = NULL, label = NULL)
Arguments
data |
A gt table object. |
title |
Title of the table. |
subtitle |
Subtitle of the table. |
label |
Label for referencing the table in LaTeX. |
Details
Be sure to use this function at the end of gt format functions. This function returns a LaTeX-formatted table header.
Value
LaTeX-formatted table header.
Examples
require(gt)
head(iris) |> gt() |> tab_header_lbl(title = "iris",label = "tab:iris") |> cat()
[Package RTLknitr version 1.0.0 Index]