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, |
| 15 | keep_tex = FALSE |
| 16 | ) |
Hao Zhu | 73cf373 | 2018-05-11 17:50:05 -0400 | [diff] [blame] | 17 | } |
| 18 | \arguments{ |
| 19 | \item{x}{A piece of HTML code for tables, usually generated by kable and |
| 20 | kableExtra} |
| 21 | |
Hao Zhu | 7f8b684 | 2018-10-23 17:41:13 -0400 | [diff] [blame] | 22 | \item{file}{save to files. If the input table is in HTML and the output file |
| 23 | 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] | 24 | conversion.} |
Hao Zhu | 73cf373 | 2018-05-11 17:50:05 -0400 | [diff] [blame] | 25 | |
| 26 | \item{bs_theme}{Which Bootstrap theme to use} |
| 27 | |
| 28 | \item{self_contained}{Will the files be self-contained?} |
Hao Zhu | 7f8b684 | 2018-10-23 17:41:13 -0400 | [diff] [blame] | 29 | |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 30 | \item{extra_dependencies}{Additional HTML dependencies. For example, |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame^] | 31 | \verb{list(}} |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 32 | |
| 33 | \item{...}{Additional variables being passed to \code{webshot::webshot}. This |
| 34 | is for HTML only.} |
| 35 | |
| 36 | \item{latex_header_includes}{A character vector of extra LaTeX header stuff. |
| 37 | Each element is a row. You can have things like |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame^] | 38 | \code{c("\\\\\\\\usepackage{threeparttable}", "\\\\\\\\usepackage{icons}")} You could |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 39 | 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^] | 40 | table, such as \verb{\\\\\\\\usepackage[magyar]\{babel\}}.} |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 41 | |
| 42 | \item{keep_tex}{A T/F option to control if the latex file that is initially created |
| 43 | should be kept. Default is \code{FALSE}.} |
Hao Zhu | 73cf373 | 2018-05-11 17:50:05 -0400 | [diff] [blame] | 44 | } |
| 45 | \description{ |
| 46 | Save kable to files |
| 47 | } |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame^] | 48 | \examples{ |
| 49 | \dontrun{ |
| 50 | library(kableExtra) |
| 51 | |
| 52 | kable(mtcars[1:5, ], "html") \%>\% |
| 53 | kable_styling("striped") \%>\% |
| 54 | row_spec(1, color = "red") \%>\% |
| 55 | save_kable("inst/test.pdf") |
| 56 | } |
| 57 | } |