blob: e28247aadaea1c1b3b1f340df261bb5582dc9188 [file] [log] [blame]
Hao Zhu2a64dc62017-08-28 10:57:57 -04001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/kable_as_image.R
3\name{kable_as_image}
4\alias{kable_as_image}
Hao Zhu8902df82019-01-07 16:27:32 -05005\title{Deprecated}
Hao Zhu2a64dc62017-08-28 10:57:57 -04006\usage{
7kable_as_image(kable_input, filename = NULL, file_format = "png",
Hao Zhu68b5bbf2018-03-26 11:30:34 -04008 latex_header_includes = NULL, keep_pdf = FALSE, density = 300,
9 keep_tex = FALSE)
Hao Zhu2a64dc62017-08-28 10:57:57 -040010}
11\arguments{
12\item{kable_input}{Raw LaTeX code to generate a table. It doesn't have to
13came from \code{kable} or \code{kableExtra}.}
14
15\item{filename}{Character String. If specified, the image will be saved under
16the specified (path &) name. You don't need to put file format like ".png"
17here.}
18
19\item{file_format}{Character String to specify image format, such as \code{png},
20\code{jpeg}, \code{gif}, \code{tiff}, etc. Default is \code{png}.}
21
22\item{latex_header_includes}{A character vector of extra LaTeX header stuff.
23Each element is a row. You can have things like
antaldanielbfaf7032018-05-30 21:55:18 +020024\code{c("\\\\usepackage{threeparttable}", "\\\\usepackage{icons}")} You could
25probably add your language package here if you use non-English text in your
26table, such as \code{\\\\usepackage[magyar]{babel}}.}
Hao Zhu2a64dc62017-08-28 10:57:57 -040027
28\item{keep_pdf}{A T/F option to control if the mid-way standalone pdf should
29be kept. Default is \code{FALSE}.}
Hao Zhu4840bc92017-09-15 15:55:05 -040030
31\item{density}{Resolution to read the PDF file. Default value is 300, which
32should be sufficient in most cases.}
Hao Zhu68b5bbf2018-03-26 11:30:34 -040033
34\item{keep_tex}{A T/F option to control if the latex file that is initially created
35should be kept. Default is \code{FALSE}.}
Hao Zhu2a64dc62017-08-28 10:57:57 -040036}
37\description{
Hao Zhu8902df82019-01-07 16:27:32 -050038deprecated
Hao Zhu2a64dc62017-08-28 10:57:57 -040039}
Jiaxiang Lifcb8d452019-04-05 12:05:10 +080040\examples{
41\dontrun{
42library(kableExtra)
43
44kable(mtcars[1:5, ], "html") \%>\%
45 kable_styling("striped") \%>\%
46 row_spec(1, color = "red") \%>\%
47 save_kable("inst/test.pdf")
48
49kable(mtcars, "latex", booktabs = T) \%>\%
50kable_styling(latex_options = c("striped", "scale_down")) \%>\%
51row_spec(1, color = "red") \%>\%
52as_image()
53}
54}