Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gt_latex_dependencies

Get the LaTeX dependencies required for a gt table


Description

When working with Rnw (Sweave) files or otherwise writing LaTeX code, including a gt table can be problematic if we don't have knowledge of the LaTeX dependencies. For the most part, these dependencies are the LaTeX packages that are required for rendering a gt table. The gt_latex_dependencies() function provides an object that can be used to provide the LaTeX in an Rnw file, allowing gt tables to work and not yield errors due to missing packages.

Usage

gt_latex_dependencies()

Details

Here is an example Rnw document that shows how the gt_latex_dependencies() can be used in conjunction with a gt table:

%!sweave=knitr

\documentclass{article}

<<echo=FALSE>>=
library(gt)
 @

<<results='asis', echo=FALSE>>=
gt_latex_dependencies()
 @

\begin{document}

<<results='asis', echo=FALSE>>=
exibble 
 @

\end{document}

Value

An object of class knit_asis.

Function ID

7-23

See Also


gt

Easily Create Presentation-Ready Display Tables

v0.2.2
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>), Joe Cheng [aut], Barret Schloerke [aut] (<https://orcid.org/0000-0001-9986-114X>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.