rbokeh
rbokeh copied to clipboard
ly_lines: Error in max(data_lengths) : invalid 'type' (list) of argument
Hi, Could you clarify the behaviour below? Maybe I missed something...
library(rbokeh)
library(data.table)
dat = data.table(x=1:3,
y=c(1,1.5,1)+rep(0:3, each=3),
group=rep(LETTERS[1:4], each=3),
color=rep(c("blue","red"), each=3))
## #1. The three following lines work
figure() %>% ly_lines(x=x, y=y, data=dat)
figure() %>% ly_lines(x=x, y=y, data=dat, group=group)
figure() %>% ly_lines(x=x, y=y, data=dat, color=color)
## #2. This one does not work
figure() %>%
ly_lines(x=x, y=y, data=dat, group=group, color=color)
## #3. Same parameters with ly_polygons works
figure() %>%
ly_polygons(xs=x, ys=y, data=dat, group = group, color=color)
###
## data.table_1.9.7 rbokeh_0.4.2
#2
gives the following error
Error in max(data_lengths) : invalid 'type' (list) of argument
In addition: Warning messages:
1: In max(idxs) : no non-missing arguments to max; returning -Inf
2: In max(idxs) : no non-missing arguments to max; returning -Inf
3: In max(idxs) : no non-missing arguments to max; returning -Inf
4: In max(idxs) : no non-missing arguments to max; returning -Inf
rbokeh is awesome! Thank you.
Confirming. Also no need to use a data.table; data.frame()
produces the same effect.
Very sorry for the delay. This does indeed need to be fixed and I'm looking into it.
This is fixed but is hanging out in the dev branch until it is ready to go live. You can test it out with devtools::install_github("bokeh/rbokeh@dev")
.
Yes, it works. Thanks!