簡體   English   中英

R Shiny:使用 DT::renderDataTable 下載整個數據集

[英]R Shiny: download the whole dataset with DT::renderDataTable

我正在使用 DT::renderDataTable 和 DT::datatable 擴展“按鈕”,以允許用戶在 R Shiny 應用程序中下載表格。

使用此腳本,用戶可以下載他在屏幕上看到的數據(例如:用戶使用選擇器顯示 50 個條目中的 1 到 25 個並單擊下載按鈕:只會下載 1 到 25 行)

有沒有辦法修改按鈕行為以允許用戶下載整個數據集(50 行)?

謝謝你的幫助!

這是我當前的腳本:

output$mytable2  <- DT::renderDataTable(
                            DT::datatable(
                                { plots.dfs()[[2]] },

                                extensions = 'Buttons',

                                options = list(                                                     
                                    fixedColumns = TRUE,
                                    autoWidth = TRUE,
                                    ordering = TRUE,
                                    dom = 'Bliftsp',
                                    buttons = c('copy', 'csv', 'excel')
                                ),


                                class = "display"
                           ))

server = FALSE參數用於renderDataTable

參考: rstudio.github.io/DT/server.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM