xAuxEmbed | R Documentation |
xAuxEmbed
is supposed to encode a file as a base64 string for
embedding such as into the R markdown rendering html file. It returns a
hyperlink.
xAuxEmbed(
file,
download.attribute = basename(file),
link.text = paste0("Download ", download.attribute)
)
file |
a file to encode |
download.attribute |
the download attribute specifying the target to be downloaded instead of being explored. By default, it is the filename of the input file. The filename of the downloaded file can be different from the input file if provided differently |
link.text |
the link text (the visible part of the hyperlink) |
a hyperlink in the form of: <a href="encoded base64 string" download="download.attribute">"link.text"</a>
This auxiliary function helps embed a file into the R markdown rendering html file for the download.
xAuxEmbed
# file <- system.file("DESCRIPTION",package="XGR")
# res <- xAuxEmbed(file)