View source: R/download_radios.R
| download_radios_handler | R Documentation |
Download with extension radios handler
download_radios_handler(id = "download_radios", file_name, file_contents)
id |
Shiny element Id. Default is "download_radios", but must be
customised to be unique if multiple instances of this module are being
used in a single app. Must match up to the ID of a |
file_name |
Name of the file to be downloaded |
file_contents |
Contents to write to the download file |
Output for use with download_radios()
Other Govstyle actions:
download_button(),
download_link(),
download_radios(),
external_link()
ui <- shiny::fluidPage(
download_radios("download_file",
file_types = c("CSV", "ODS"),
file_sizes = c("2 KB", "5 KB")
)
)
server <- function(input, output, session) {
output$download_file <- download_radios_handler(
"download_file",
file_name = "simple_data_frame",
file_contents = mtcars
)
}
if (interactive()) shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.