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

问题描述:

我试图在Shiny中使用renderDataTable显示数据帧。尝试在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] 

ps如果我用虹膜替换我的计算数据框,它工作正常。但是,我不知道我的数据帧summaryActivityDT有什么问题。

+0

你不使用'renderTable'作为那种事情吗?... – VermillionAzure

+0

SummaryActivityDT存储为数据框值还是数据?通常这是一个维度问题。 –

+0

@VermillionAzure renderDataTable提供了一些好东西,如列排序。无论如何,我设法找出造成问题的原因。 – PeterV

POSIXlt导致所有问题。将POSITlt中的那一列更改为Chr后,一切正常。

谢谢大家。希望别人会觉得这很有用。