blob: 8fcdce4d5d6813ddd1b23bb63ef8f7cb3398f9b7 [file] [log] [blame]
Hao Zhuf1873a42019-01-07 15:57:01 -05001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/as_image.R
3\name{as_image}
4\alias{as_image}
5\title{Render the table as an format-independent image and use it in rmarkdown}
6\usage{
7as_image(x, width = NULL, height = NULL, ...)
8}
9\arguments{
10\item{x}{kable input. Either HTML or LaTeX}
11
12\item{width}{Image width in inches. (1 inch = 2.54 cm)}
13
14\item{height}{Image height in inches. (1 inch = 2.54 cm)}
15
16\item{...}{Additional arguments passed to save_kable.}
Hao Zhub361fb52019-01-15 12:24:10 -060017
18\item{file}{By default, as_image saves to an temp file, which works for
19normal rmarkdown. However if you are using things like xaringan, which can't
20be a standalone html, you can specify this file be the path you need, eg.
21"img/something.png"}
Hao Zhuf1873a42019-01-07 15:57:01 -050022}
23\description{
24This function generates a temporary png file using \code{save_kable}
25and then try to put it in an rmarkdown document using
26\code{knitr::include_graphics}.
27}