Hao Zhu | 73cf373 | 2018-05-11 17:50:05 -0400 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/save_kable.R |
| 3 | \name{save_kable} |
| 4 | \alias{save_kable} |
| 5 | \title{Save kable to files} |
| 6 | \usage{ |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame] | 7 | save_kable( |
| 8 | x, |
| 9 | file, |
| 10 | bs_theme = "simplex", |
| 11 | self_contained = TRUE, |
| 12 | extra_dependencies = NULL, |
| 13 | ..., |
| 14 | latex_header_includes = NULL, |
Hao Zhu | ab67094 | 2020-08-19 15:35:35 -0400 | [diff] [blame] | 15 | keep_tex = FALSE, |
| 16 | density = 300 |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame] | 17 | ) |
Hao Zhu | 73cf373 | 2018-05-11 17:50:05 -0400 | [diff] [blame] | 18 | } |
| 19 | \arguments{ |
| 20 | \item{x}{A piece of HTML code for tables, usually generated by kable and |
| 21 | kableExtra} |
| 22 | |
Hao Zhu | 7f8b684 | 2018-10-23 17:41:13 -0400 | [diff] [blame] | 23 | \item{file}{save to files. If the input table is in HTML and the output file |
| 24 | ends with \code{.png}, \code{.pdf} and \code{.jpeg}, \code{webshot} will be used to do the |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 25 | conversion.} |
Hao Zhu | 73cf373 | 2018-05-11 17:50:05 -0400 | [diff] [blame] | 26 | |
| 27 | \item{bs_theme}{Which Bootstrap theme to use} |
| 28 | |
| 29 | \item{self_contained}{Will the files be self-contained?} |
Hao Zhu | 7f8b684 | 2018-10-23 17:41:13 -0400 | [diff] [blame] | 30 | |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 31 | \item{extra_dependencies}{Additional HTML dependencies. For example, |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame] | 32 | \verb{list(}} |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 33 | |
| 34 | \item{...}{Additional variables being passed to \code{webshot::webshot}. This |
| 35 | is for HTML only.} |
| 36 | |
| 37 | \item{latex_header_includes}{A character vector of extra LaTeX header stuff. |
| 38 | Each element is a row. You can have things like |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame] | 39 | \code{c("\\\\\\\\usepackage{threeparttable}", "\\\\\\\\usepackage{icons}")} You could |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 40 | probably add your language package here if you use non-English text in your |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame] | 41 | table, such as \verb{\\\\\\\\usepackage[magyar]\{babel\}}.} |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 42 | |
| 43 | \item{keep_tex}{A T/F option to control if the latex file that is initially created |
| 44 | should be kept. Default is \code{FALSE}.} |
Hao Zhu | ab67094 | 2020-08-19 15:35:35 -0400 | [diff] [blame] | 45 | |
| 46 | \item{density}{density argument passed to magick if needed. Default is 300.} |
Hao Zhu | 73cf373 | 2018-05-11 17:50:05 -0400 | [diff] [blame] | 47 | } |
| 48 | \description{ |
| 49 | Save kable to files |
| 50 | } |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame] | 51 | \examples{ |
| 52 | \dontrun{ |
| 53 | library(kableExtra) |
| 54 | |
| 55 | kable(mtcars[1:5, ], "html") \%>\% |
| 56 | kable_styling("striped") \%>\% |
| 57 | row_spec(1, color = "red") \%>\% |
| 58 | save_kable("inst/test.pdf") |
| 59 | } |
| 60 | } |