Use this function to turn an stable object in to a high-quality pdf file,
The result can be included in an Rmarkdown file rendered to .html or
other uses.
Arguments
- x
an stable object; this can be the result of calling
stable()orstable_long().- ...
arguments passed to
st_aspdf(); please take the time to review the details in that help topic.- width
the relative width of the image; passed to
st_image_show(); this must be greater than 0 and less than or equal to 1.- border
passed as an option to
standalonelatex output type; see details.
Value
A possibly resized magick image object (see magick::image_read_pdf()).
Details
This function depends on the magick and pdftools packages being installed.
First,
xis rendered withst_aspdf()Next, the pdf file is read using
magick::image_read_pdf()Finally, the image is possibly resized via
st_image_show()
