DataTable ajax warning table for some people but not all with brilliant

I got this error when I created a brilliant application in R with DataTables packages on my mobile and one laptop. However, he did not give errors with other laptops, the same code worked yesterday and the day before. I have not changed the code, but it throws an error.

Why there are problems with some devices, but not with all devices. I used other devices, these devices did not throw an error.

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

What is the problem?

The following is the error:

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

+5
source share
2 answers

I suffer too. Please see our discussion on this issue # 269 on Github .

This seems to be a problem with post-release 0.1, where you need to "smooth out" variables using as.numeric .

Release

The example and solution given by XD-DENG were and quoted them:

"The error disappeared when I use

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

instead:

 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 means additional attribution, a dimension. This caused an error.

But this is still strange given that version 0.1 of DT works fine on both. "

PATCH

@yihui made a fix for this version, so try updating the DT package. (You can use the devtools package to install from github devtools::install_github('rstudio/DT') )

I hope this fixes this intermittent error.

+2
source

I just explicitly made as.numeric () for all the numeric columns in my data.frame file (although they are already numeric when I do str ()) and the problem goes away.

+1
source

Source: https://habr.com/ru/post/1245924/


All Articles