【问题标题】:R Shiny: download the whole dataset with DT::renderDataTableR Shiny:使用 DT::renderDataTable 下载整个数据集
【发布时间】:2018-10-08 03:23:00
【问题描述】:

我正在使用带有扩展“按钮”的 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"
                           ))

【问题讨论】:

    标签: r shiny dt


    【解决方案1】:

    renderDataTable 使用server = FALSE 参数。

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

    【讨论】:

      猜你喜欢
      • 2021-11-20
      • 2020-05-02
      • 2015-10-07
      • 2015-09-13
      • 2018-10-07
      • 2018-08-07
      • 1970-01-01
      • 2016-10-18
      • 2018-10-06
      相关资源
      最近更新 更多