When using ggvis with a data table, I get "Error: this code should not be reached"

When I type the following code

library(data.table) library(ggvis) age <- as.integer(c(1,4,8,5,4,3,2,4,5,4,3)) disk <- c(3,3,3,3,3,3,3,3,3,3,3) dt <- data.table(age, disk) df <- data.frame(age, disk) dt %>% ggvis(x=~age) %>% layer_histograms() df %>% ggvis(x=~age) %>% layer_histograms() 

When a data frame is used, a histogram is created. However, when the data table is used, I get an error message:

 Guessing width = 2 # range / 30 Error: This code should not be reached. 

No charts. Can someone please tell me why the entry of the data table causes this error?

thanks

+5
source share