Builds the downloadHandler() behind the CSV buttons of the
app. The file is named after stem and today's date, such as
overview-2026-11-07.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 <- golemstockindices:::csv_download(reactive(head(mtcars)), "cars")
} # }