echarts4r icon indicating copy to clipboard operation
echarts4r copied to clipboard

'length(x) = 2 > 1' in coercion to 'logical(1)' - R version 4.3.0

Open william-lima-p opened this issue 2 years ago • 6 comments

As per https://cran.r-project.org/doc/manuals/r-devel/NEWS.html, using || in if statements is no longer safe in R 4.3.0.

For that reason, something like tibble(Column = rep(as.POSIXct('2023-01-01'), 3)) %>% e_chart(Column) will throw out an error.

william-lima-p avatar May 04 '23 14:05 william-lima-p

Thanks for flagging this. This should be fixed.

JohnCoene avatar May 04 '23 15:05 JohnCoene

Thanks!

william-lima-p avatar May 04 '23 15:05 william-lima-p

Still happpens when using timeline, unfortunately. For example:

tibble(
  Column = rep(as.POSIXct('2023-01-01'), 3),
  Letter = LETTERS[1:3]
) %>%
  group_by(Letter) %>%
  e_chart(Column, timeline = TRUE)

william-lima-p avatar May 04 '23 19:05 william-lima-p

Sorry. Should be good now.

JohnCoene avatar May 05 '23 16:05 JohnCoene

Perfect! Thank you.

william-lima-p avatar May 11 '23 14:05 william-lima-p

John, it still happens with e_charts_, for me. Example:

tibble(
  Column = rep(as.POSIXct('2023-01-01'), 3),
  Letter = LETTERS[1:3]
) %>%
  group_by(Letter) %>%
  e_charts_('Column', timeline = TRUE)

This throws out

Error in cl == "character" || cl == "factor" : 
  'length = 2' in coercion to 'logical(1)'

With e_charts, it's all fine.

william-lima-p avatar Nov 16 '23 19:11 william-lima-p