This function generates a temporary png file using save_kable
and then try to put it in an rmarkdown document using
knitr::include_graphics
.
as_image(x, width = NULL, height = NULL, file = NULL, ...)
kable input. Either HTML or LaTeX
Image width in inches. (1 inch = 2.54 cm)
Image height in inches. (1 inch = 2.54 cm)
By default, as_image saves to an temp file, which works for normal rmarkdown. However if you are using things like xaringan, which can't be a standalone html, you can specify this file be the path you need, eg. "img/something.png"
Additional arguments passed to save_kable.