rbokeh icon indicating copy to clipboard operation
rbokeh copied to clipboard

ly_lines: Error in max(data_lengths) : invalid 'type' (list) of argument

Open Atrebas opened this issue 8 years ago • 4 comments

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.

Atrebas avatar May 20 '16 10:05 Atrebas

Confirming. Also no need to use a data.table; data.frame() produces the same effect.

igoldin2u avatar Jul 02 '16 18:07 igoldin2u

Very sorry for the delay. This does indeed need to be fixed and I'm looking into it.

hafen avatar Aug 23 '16 20:08 hafen

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").

hafen avatar Aug 23 '16 22:08 hafen

Yes, it works. Thanks!

Atrebas avatar Aug 24 '16 07:08 Atrebas