View source: R/e_table_print.R
e_table_print | R Documentation |
If using in Rmd file and a latex documnet, then requires two header includes:
e_table_print(
dat,
sw_scale = FALSE,
sw_kable_format = c("simple", "kbl", "html", "latex", "doc")[2],
sw_latex_options = c("basic", "striped", "hold_position", "HOLD_position",
"scale_down", "repeat_header")[c(2, 3)],
...
)
dat |
data.frame or tibble to print |
sw_scale |
if "latex" T/F to scale to fit page, if "html" then a point size to pass to |
sw_kable_format |
"simple", "html", "latex", or "doc" |
sw_latex_options |
passed to |
... |
other arguments passed to |
EXAMPLE OF .Rmd YAML header for pdf via LaTeX --- title: "Title" date: "Today" output: pdf_document: df_print: kable latex_engine: lualatex toc: true number_sections: true toc_depth: 2 keep_tex: true header-includes: - \usepackage{booktabs} - \usepackage{colortbl} always_allow_html: yes fig_caption: TRUE ---
invisible(NULL)
dat_mtcars_e |> head() |> e_table_print()
## Not run:
# html rescaled size
dat_mtcars_e |>
head() |>
e_table_print(sw_scale = 6)
# outputs into LaTeX document, scaling is automatic to fit page width
# works best before a \clearpage
# use chunk option: results = 'asis', see other options at https://yihui.org/knitr/options/
dat_mtcars_e |>
head() |>
e_table_print(sw_scale = TRUE, sw_kable_format = "latex")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.