Creates a download button for a file or directory, suitable to embed into an HTML report.
Usage
download_button(
path,
type,
button_label,
output_name = NULL,
button_type = "success",
has_icon = TRUE,
icon = "fa fa-save",
add_button = TRUE,
...
)
Arguments
- path
A character string specifying the path to the file or directory.
- type
A character string specifying the type of download. Either
"file"
or"dir"
.Character (HTML), button label
- output_name
Name of of the output file. If not specified, it will take the source file's name if one file is specified. In case of multiple files, the
output_name
must be specified.Character, one of the standard Bootstrap types
- has_icon
Specify whether to include fontawesome icons in the button label
- icon
Fontawesome tag e.g.: "fa fa-save"
A logical indicating whether to add the download button to the HTML report. (default = TRUE)
- ...
Arguments passed on to
downloadthis::download_file
self_contained
A boolean to specify whether your HTML output is self-contained. Default to
FALSE
.
Value
htmltools::tag
, <button>