table_label: Table Label

Description Usage Arguments Examples

View source: R/table_prep.R

Description

Adds labels to LaTeX tables that have are stored as a vector (e.g. output from kable() or stargazer() which is stored by capture.output()). Labels cannot be seen within the table, but rather can be referenced within a rmarkdown document via \label{tab:your_label_here}

Usage

1
table_label(latex_table, caption)

Arguments

latex_table

Table from capture.output()

caption

Examples

1
2
3
4
5
6
my_table_rough <- capture.output(stargazer(mtcars))
my_table <- table_label(my_table_rough, "demographics")
print_table(table)

# Within Markdown Document
`\label{tab:demographics}` # this will print as Table 1, and update depending on the order of the tables.

johnhenrypezzuto/blpl documentation built on Dec. 6, 2019, 2:36 a.m.