View source: R/preview-standalone.R
st_aspng | R Documentation |
Create a standalone png snippet using latex
and dvipng
from an stable
object; both functions are required to be installed for this to work.
The resultant png
file is saved on disk and the relative path to the file
is returned. st2png()
is an alias to st_as_png()
.
st_aspng(
x,
stem = "pmt-standalone-preview",
dir = tempdir(),
font = "helvetica",
textwidth = getOption("pmtables.text.width", 6.5),
border = getOption("pmtables.image.border", "0.2cm 0.7cm"),
ntex = 1,
dpi = 200
)
st2png(
x,
stem = "pmt-standalone-preview",
dir = tempdir(),
font = "helvetica",
textwidth = getOption("pmtables.text.width", 6.5),
border = getOption("pmtables.image.border", "0.2cm 0.7cm"),
ntex = 1,
dpi = 200
)
x |
an stable object; this can be the result of calling |
stem |
used to build intermediate and output file names. |
dir |
directory for building the pdf file. |
font |
the font to use; alternative values include |
textwidth |
the page width (in inches) when building with |
border |
passed as an option to |
ntex |
number of times to build the pdf file |
dpi |
dots per inch for the resulting |
A string containing the path to the rendered png
file.
st_aspdf()
, st_as_image()
, st_image_show()
## Not run:
Sys.which("latex")
Sys.which("dvipng")
tab <- stable(stdata())
st_aspng(tab)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.