Builds the downloadHandler() behind the CSV buttons of the app. The file
is named after stem and today's date, such as top100-2026-10-24.csv,
and written with utils::write.csv() without row names. When data or
stem stop with shiny::req() or shiny::validate(), the download fails
and the app keeps running.
Value
A shiny::downloadHandler(), to assign to an output.
Examples
if (FALSE) { # \dontrun{
# inside a module server, with downloadButton(ns("csv"), "CSV") in its UI:
output$csv <- crypto:::csv_download(reactive(head(mtcars)), "cars")
} # }