2015-07-21 44 views
1

我試圖在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

回答

2

POSIXlt導致所有問題。將POSITlt中的那一列更改爲Chr後,一切正常。

謝謝大家。希望別人會覺得這很有用。

相關問題