Description Usage Arguments Examples
Save kable to files
1 2 3 4 5 6 7 8 9 10 11 | save_kable(
x,
file,
bs_theme = "simplex",
self_contained = TRUE,
extra_dependencies = NULL,
...,
latex_header_includes = NULL,
keep_tex = FALSE,
density = 300
)
|
x |
A piece of HTML code for tables, usually generated by kable and kableExtra |
file |
save to files. If the input table is in HTML and the output file
ends with |
bs_theme |
Which Bootstrap theme to use |
self_contained |
Will the files be self-contained? |
extra_dependencies |
Additional HTML dependencies. For example,
|
... |
Additional variables being passed to |
latex_header_includes |
A character vector of extra LaTeX header stuff.
Each element is a row. You can have things like
|
keep_tex |
A T/F option to control if the latex file that is initially created
should be kept. Default is |
density |
density argument passed to magick if needed. Default is 300. |
1 2 3 4 5 6 7 8 9 | ## Not run:
library(kableExtra)
kable(mtcars[1:5, ], "html") %>%
kable_styling("striped") %>%
row_spec(1, color = "red") %>%
save_kable("inst/test.pdf")
## End(Not run)
|
PhantomJS not found. You can install it with webshot::install_phantomjs(). If it is installed, please make sure the phantomjs executable can be found via the PATH variable.
save_kable could not create image with webshot package. Please check for any webshot messages
Warning messages:
1: In file.create(file) :
cannot create file 'inst/test.pdf', reason 'No such file or directory'
2: In normalizePath(file) :
path[1]="inst/test.pdf": No such file or directory
3: In file.remove(file) :
cannot remove file 'inst/test.pdf', reason 'No such file or directory'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.