尝试在 Shiny 中使用 renderDataTable 显示数据框时出错

Error when trying to display dataframe using renderDataTable in Shiny

我正在尝试在 Shiny 中使用 renderDataTable 显示数据框。

我的server.R有以下代码:

output$table <- renderDataTable(
 summaryActivityDT, options = list(orderClasses = TRUE) 
 )

当我 运行 应用程序时,我收到以下警告框:

DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/manual/tech-notes/7

在调试时(基于警告框中的 url),我遇到了以下错误:

dims [product 75] do not match the length of object [86]

p.s。如果我用 iris 替换我计算的数据框,它工作正常。但是,我不知道我的数据框 summaryActivityDT 出了什么问题。

POSIXlt 导致了所有问题。将该列从 POSITlt 更改为 Chr 后,一切正常。

谢谢大家。希望其他人会发现这很有用。