Kppatel Patel Kppatel Patel - 1 year ago 104
R Question

DataTable warning table ajax error for some people but not all with shiny

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.

Any idea how to fix this problem? The solution for this problem should be explained here

What is issue ?

Following is thrown error as follows:

DataTables warning: table id=DataTables_Table_0 - Ajax error. For more
information about this error, please see

Answer Source

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

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


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

"The error is gone when I use

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

instead of:

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

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

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


@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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download