blob: 76c144c70031312c26ac993ba77246df618fd0e9 [file] [log] [blame]
Hao Zhu73cf3732018-05-11 17:50:05 -04001% 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 Zhu9410a272020-08-03 01:11:47 -04007save_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 Zhu73cf3732018-05-11 17:50:05 -040017}
18\arguments{
19\item{x}{A piece of HTML code for tables, usually generated by kable and
20kableExtra}
21
Hao Zhu7f8b6842018-10-23 17:41:13 -040022\item{file}{save to files. If the input table is in HTML and the output file
23ends with \code{.png}, \code{.pdf} and \code{.jpeg}, \code{webshot} will be used to do the
Hao Zhu270846b2019-01-06 17:52:26 -050024conversion.}
Hao Zhu73cf3732018-05-11 17:50:05 -040025
26\item{bs_theme}{Which Bootstrap theme to use}
27
28\item{self_contained}{Will the files be self-contained?}
Hao Zhu7f8b6842018-10-23 17:41:13 -040029
Hao Zhu270846b2019-01-06 17:52:26 -050030\item{extra_dependencies}{Additional HTML dependencies. For example,
Hao Zhu9410a272020-08-03 01:11:47 -040031\verb{list(}}
Hao Zhu270846b2019-01-06 17:52:26 -050032
33\item{...}{Additional variables being passed to \code{webshot::webshot}. This
34is for HTML only.}
35
36\item{latex_header_includes}{A character vector of extra LaTeX header stuff.
37Each element is a row. You can have things like
Hao Zhu9410a272020-08-03 01:11:47 -040038\code{c("\\\\\\\\usepackage{threeparttable}", "\\\\\\\\usepackage{icons}")} You could
Hao Zhu270846b2019-01-06 17:52:26 -050039probably add your language package here if you use non-English text in your
Hao Zhu9410a272020-08-03 01:11:47 -040040table, such as \verb{\\\\\\\\usepackage[magyar]\{babel\}}.}
Hao Zhu270846b2019-01-06 17:52:26 -050041
42\item{keep_tex}{A T/F option to control if the latex file that is initially created
43should be kept. Default is \code{FALSE}.}
Hao Zhu73cf3732018-05-11 17:50:05 -040044}
45\description{
46Save kable to files
47}
Hao Zhu9410a272020-08-03 01:11:47 -040048\examples{
49\dontrun{
50library(kableExtra)
51
52kable(mtcars[1:5, ], "html") \%>\%
53 kable_styling("striped") \%>\%
54 row_spec(1, color = "red") \%>\%
55 save_kable("inst/test.pdf")
56}
57}