| vol_standalone | R Documentation |
Inlines a payload into the viewer page, so that the result opens from a local file with no server and travels as a single attachment.
vol_standalone(payload, path = NULL, viewer = NULL, manifest = NULL)
payload |
A |
path |
Destination file. Defaults to a file named after the template,
|
viewer |
The page template to inline into. Defaults to the copy the package ships. |
manifest |
The manifest to embed. Taken from |
Carry a payload inside one HTML file
A page served over http fetches its images. The same page opened from disk cannot, because a browser refuses a cross-origin read from a local file, so this build carries every image as a data URI instead, at the cost of the third that base64 adds. For the case study at its native grid the directory is 1.5 MB and the single file 2.07 MB.
The splice works on bytes and not on lines, so the accented characters of the page and its line endings pass through untouched, and the block goes in immediately before the script that reads it.
The path written, invisibly.
vol_payload() for the payload, vol_widget() for the same
renderer inside shiny, shinyVolumr() for the application that
drives the whole workflow.
out <- vol_standalone(vol_example_payload(),
path = file.path(tempdir(), "med.html"))
file.size(out)
if (interactive()) utils::browseURL(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.