View source: R/zz-api-file-output-utils.R
hux_save_as | R Documentation |
depending on the context return the correct format for a document. The basic output here is to use HTML as an output if possible and convert it to an image or a PDF that can then be included into a latex document for example.
hux_save_as(...)
... |
Arguments passed on to
|
the output depends on if the function is called in a knitr session. It maybe the HTML or a link to the pdf output for example.
try({
hux = iris %>% huxtable::as_hux() %>%
huxtable::theme_mondrian(font="Roboto")
out = .hux_save_as(hux, tempfile())
# browseURL(out$html)
out2 = .hux_save_as(hux, tempfile(), formats=c("pdf","png"))
as.character(out2)
# The resulting pdf has fonts embedded & is multipage.
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.