download_csv: Download Data as CSV

Description Usage Arguments Examples

View source: R/download-csv.R

Description

A shiny module that adds a download button to download data as a CSV.

Usage

1
2
3
download_csv(input, output, session, dataset, filename, ...)

download_csv_ui(id, ...)

Arguments

input

standard shiny boilerplate

output

standard shiny boilerplate

session

standard shiny boilerplate

dataset

a data frame, or a function/reactive that returns a data frame

filename

a string, or a function/reactive that returns a string

...

additional parameters to pass to write.csv

id

a string indicating the id to use the module with.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
  shinybones::preview_module(download_csv,
    dataset = mtcars,
    filename = function(){
      paste0('mtcars-', format(Sys.time(), "%Y-%m-%d-%H-%M-%S"), '.csv')
    }
  )

## End(Not run)

ramnathv/shinymetrics documentation built on June 29, 2020, 10:39 p.m.