我正在Ubuntu服务器上托管一个闪亮的(免费版本)应用程序
然后我在浏览器中看到此错误消息:
"DataTables warning: table id=DataTables_Table_0 - Ajax error.
For more information about this error, please see http://datatables.net/tn/7"
这是我的服务器功能的一小段内容:
####Server ####
server <- function(input, output) {
####Heatmap ####
output$all <- renderPlotly({
plot_ly(x = colnames(netmatrix),
y = rownames(netmatrix),
z = netmatrix,
type = "heatmap") %>% layout(xaxis = list(type = 'category'),
yaxis = list(type = 'category'),
height = 1000)
})
####Table ####
output$table_all <- DT::renderDataTable(
data.table(summary_table),
filter = 'top',
rownames = FALSE,
extensions = c("FixedColumns"),
options = list(searchHighlight = TRUE,
regex = TRUE,
scrollX = TRUE,
fixedColumns = list(leftColumns = 5))
)
} #End of Server
当我查看Chrome中的开发工具控制台时,看到此POST错误:
my_URI + "/session/86d8f192aa11a9c4eba78560895c26b9/dataobj/table_all?w=&nonce=e01594d12632edd6 404 (Not Found)"
我已经研究了Ajax错误,并查看了无数的rstudio,github和SO线程,但似乎没有任何效果。我认为这是ajax调用中的某种超时问题,因为“ Heatmap”渲染约5000x5000矩阵的速度很慢,并且当我删除“ Heatmap”组件时,“ Table”可以正常加载且没有错误。我一直在寻找用于数据表和Ajax的期权文档,但是没有运气。
希望有人遇到了这个问题或认识到出了什么问题,我们将不胜感激!
编辑:
摘要表的结构
删除隐私的值和名称。
str(summary_table)
'data.frame': 589557 obs. of 11 variables:
$ X1: int
$ X2: int
$ X3: chr
$ X4: chr
$ X5: int
$ X6: chr
$ X7: chr
$ X8: chr
$ X9: chr
$ X10: chr
$ X11: chr
我确实尝试在整数列上显式地执行as.numeric(),如在github上的旧线程中所建议的那样,但这无济于事。