View source: R/preview-standalone.R
st_image_show | R Documentation |
Show table output that has been saved to pdf or png format
st_image_show(
path,
width = getOption("pmtables.image.width", 0.95),
knitting = getOption("knitr.in.progress")
)
path |
path to a png or pdf file saved on disk. |
width |
for resizing the magick object; must be a value greater than 0 and less than or equal to 1; when not knitting, the width is taken as a fraction of the current graphics device width; when knitting and the image is in png format, the width is taken to be a fraction of the available space; this parameter is ignored when knitting pdf output. |
knitting |
if |
This function requires the magick and pdftools packages to be installed.
If you are not knitting an rmarkdown document, then the image is read
using magick::image_read_pdf()
(pdf files) or magick::image_read()
(png files) and resized relative to the width of the current graphics
device (see grDevices::dev.size()
).
If you are knitting with pdf output, then the image is read in
using magick::image_read_pdf()
and passed through
knitr::include_graphics()
without resizing. If you are knitting with html
output, then the image is read in using magick::image_read()
and resized using magick::image_resize()
to a certain fraction of the
available space (see width
argument).
Depends the context; see details.
st_aspng()
, st_aspdf()
, st_as_image()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.