Current method for "Download"-ing entire DataTable in view

Hello Rstudio community, what is the current recommended method for allowing interactive download of an entire DataTable (e.g. tab-delimited or csv)?
The context of my code below. Hopefully I've provided enough details.


  • Shraddha
server <- function(input, output, session) {
  curdata <- reactiveVal(NULL)
  # curdata populated by selecting data fields to view

output$res_table <- DT::renderDataTable({curdata()$data})

ui <- fluidPage(
tabPanel("Data table",DT::dataTableOutput("res_table")),

you have the content of your DT table in reactive crdata()$data, so provide a downloadButton with downloadHandler as per :

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.