r - ggvis and data.table conflict? -
i trying run ggvis in combination data.table, see code below. following error:
error in `:=`(mpg2, mpg/2) : check is.data.table(dt) == true. otherwise, := , `:=`(...) defined use in j, once , in particular ways. see help(":="). if run line mtcars[ , mpg2 := mpg / 2] in console there no problem. problem? [i still suspicious fact both data.table , ggvis use :=.
--- title: "untitled" output: html_document runtime: shiny --- ```{r echo = false} library(ggvis) library(data.table) mtcars %>% ggvis(x = ~wt, y = ~mpg) %>% layer_points() mtcars = data.table(mtcars) mtcars[, mpg2 := mpg / 2] # gives error message # code below not work line above throws error mtcars %>% ggvis(x = ~wt, y = ~mpg2) %>% layer_points() ```
data.table version 1.9.2
ggvis github 0.3.0.9001 cran version complained missing knit_print.
i have updated data.table 1.9.3 , works should now. thanks!
Comments
Post a Comment