View source: R/download_button.R
download_button | R Documentation |
Save an object as RDS and create a download button that can be rendered to Rmarkdown HTML pages. Uses the package downloadthis.
download_button(
object,
save_output = FALSE,
outfile_dir = NULL,
filename = NULL,
button_label = paste0("Download: ", "<code>", filename, "</code>"),
output_extension = ".rds",
icon = "fa fa-save",
button_type = "success",
self_contained = TRUE,
add_download_button = TRUE,
verbose = TRUE
)
object |
R object to serialize. |
save_output |
Default FALSE. If TRUE, all outputs (tables and plots) of the analysis will be saved in a folder (EpiCompare_file). |
outfile_dir |
Directory to save the file to. |
filename |
Name of the file to save. |
button_label |
Character (HTML), button label |
output_extension |
Extension of the output file. Currently, |
icon |
Fontawesome tag e.g.: "fa fa-save" |
button_type |
Character, one of the standard Bootstrap types |
self_contained |
A boolean to specify whether your HTML output is
self-contained. Default to |
add_download_button |
Add download buttons for each plot or dataset. |
verbose |
Print messages. |
Download button as HTML text.
button <- download_button(object=mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.