【发布时间】:2020-07-21 07:08:50
【问题描述】:
我是 DataTables 的新手,但对它的强大功能感到惊讶,并设法创建了几个不同的表并在 Shiny 仪表板中使用它们。目前我正在尝试实现this table,并在更新了一些代码后设法做到了(请参阅我自己在线程中的答案)。
但是,在将决赛桌插入 Shiny 时,像这样......
shinyApp(
ui = fluidPage(
DT::dataTableOutput("table")
),
server = function(input, output) {
output$table = DT::renderDataTable({final_table})
}
)
...我收到错误 DataTables warning: table id=DataTables_Table_0 - 'dim<-.vctrs_list_of()' not supported. 只需在 RStudio 中运行 final_table 即可完全按照预期生成 DataTable。使用 shiny 中的同名函数而不是 DT 会返回一个空白页。
我从我必须对上面的链接答案所做的更改之一中识别出vctrs_list_of(这是因为tidyr 的nest() 这些天返回一个嵌套列vctrs_list_of 而不是@987654331 @),所以我想那里发生了一些事情。
但是,使用“检查元素”时,我只看到一个 Uncaught TypeError: Cannot read property 'length' of undefined JS 错误,它链接到大量 DataTables JS 脚本中的一些晦涩的行。该警告未包含在 DataTables 的文档中。
任何线索/提示将不胜感激!
【问题讨论】:
标签: r shiny datatables