DataTable 警告表 ajax 错误对于某些人但并非所有人都闪亮 [英] DataTable warning table ajax error for some people but not all with shiny

查看:34
本文介绍了DataTable 警告表 ajax 错误对于某些人但并非所有人都闪亮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的手机和一台笔记本电脑中使用 DataTables 包在 R 中创建闪亮的应用程序时,我收到了这样的错误.但是,它并没有在其他笔记本电脑上引发错误,相同的代码昨天和前天都在工作.我没有更改代码,但它抛出错误.

I recieved such error when, in created shiny app in R with DataTables packages in my mobile and one laptop. However, it didn't throw error with other laptops, Same code was working yesterday, and day before yesterday. I haven't changed code, but it is throwing error.

为什么某些设备有问题,但不是所有设备都有问题.我使用了其他设备,这些设备没有抛出错误.

Why there is problem with some devices but not all devices. I used other devices, those devices are not throwing error.

知道如何解决这个问题吗?这个问题的解决方案应该在这里解释http://datatables.net/manual/tech-notes/7

Any idea how to fix this problem? The solution for this problem should be explained here http://datatables.net/manual/tech-notes/7

什么是问题?

以下抛出错误如下:

DataTables 警告:table id=DataTables_Table_0 - Ajax 错误.更多有关此错误的信息,请参阅 http://datatables.net/tn/7

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

推荐答案

我也很痛苦.请查看此 Github 上的问题 #269 的讨论.

I am also suffering. Please take a look at the discussion of this issue #269 on Github.

在 0.1 版之后,您似乎需要使用 as.numeric 来展平"变量,这似乎是一个问题.

It seems to be a problem post version 0.1 where you need to "flatten" variables using as.numeric.

问题

XD-DENG 给出的示例和解决方案是并引用它们:

Example and solution given by XD-DENG was and to quote them:

当我使用时错误消失了

temp <- tapply(iris$Sepal.Length, iris$Species, mean)
  result <- data.frame(species = names(temp),
                       mean = as.numeric(temp))
  return(result)

代替:

temp <- tapply(iris$Sepal.Length, iris$Species, mean)
  result <- data.frame(species = names(temp),
                       mean = temp)
  return(result)

主要区别在于列均值是否有额外的属性、维度.这就是导致错误的原因.

The main difference is whether the column mean has additional attribution, dimension. This is what caused the error.

但鉴于 DT 的 0.1 版在两者上都能完美运行,这仍然很奇怪."

But it's still weird given version 0.1 of DT works perfectly on both."

补丁

@yihui 已将此修复推送到开发版本,因此请尝试更新您的 DT 包.(你可以使用包 devtools 从 github 安装 devtools::install_github('rstudio/DT'))

@yihui has pushed a fix for this to the dev version so please try update your DT package. (You can use package devtools to install from github devtools::install_github('rstudio/DT'))

我希望这能解决这个间歇性错误.

I hope this fixes this intermittent error.

这篇关于DataTable 警告表 ajax 错误对于某些人但并非所有人都闪亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆