Download button in shiny app






















A full example is: server. Tags: Javascript R Shiny Shinyjs. Related How to setup next. Drupal - Why does js click function run multiple times? Drupal - Get current language of Drupal 8 in javascript?

The Overflow Blog. Who owns this outage? Building intelligent escalation chains for modern SRE. Podcast Who is building clouds for the independent developer?

Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Related Hot Network Questions. Question feed. How to understand reactivity in R. Database basics - dplyr and DBI. Using the pool package basics.

Using the pool package advanced. Using dplyr and pool to query a database. Persistent data storage in Shiny apps. Application layout guide.

Build a dynamic UI that reacts to user input. Displaying and customizing static tables. How to use DataTables in a Shiny App. Help users download data from your app. Help users upload files to your app. Interactive plots. Selecting rows of data. Interactive plots - advanced. JavaScript actions packaged for Shiny apps. How to build a JavaScript based widget.

Some of the boxes display tables rendered using knitr , some display plots produced by ggplot. Regardless, each box gives users the option to download both the plot and a customized data set containing the plotted data in a csv file. I have individual downloadButtons and an instance of downloadHandler associated with each download. The code for these blocks follows the examples available in the shiny documentation.

I'm not looking forward to maintaining 50 to 60 instances of the downloadHandler to manage all of the downloads. Are there any examples of putting the downloadHandler in a wrapper function? Ideally, I'd like to pass an output parameter, a file name parameter and an output type parameter to the function. This sounds like a good scenario for the use of a module function.

I did a blogpost about using modules for this kind of thing recently. Let me know if you have any questions!



0コメント

  • 1000 / 1000