Skip to contents

A .jasp archive already bundles a fully rendered index.html – JASP's own output view, complete with result tables and any plots – alongside the data (see the file header). This extracts that index.html as-is and inlines every plot it references (an <img src="resources/.../*.png">) as a base64 data: URI, so the result is a single, portable, self-contained file that looks exactly like JASP's own output window, with no external image files to keep alongside it.

Usage

export_jasp_html(path, out = NULL)

Arguments

path

path to a .jasp file

out

path to write the HTML file to. Without it, the file is named after path with the extension .html and written to the R session's temporary folder, which R removes when the session ends (CRAN does not allow writing elsewhere unless you ask for it); a message says where.

Value

the path written to, invisibly

Examples

jasp <- system.file("extdata", "sample.jasp", package = "metacheck")
html <- export_jasp_html(jasp, file.path(tempdir(), "sample_jasp.html"))
file.exists(html)
#> [1] TRUE