highcharter icon indicating copy to clipboard operation
highcharter copied to clipboard

hcaes_string() doesn't work due to conflicts with other packages

Open mgarbuzov opened this issue 11 months ago • 1 comments

Re-creating issue #771 which was closed due to inactivity, but the issue still persists. It would be great if it was addressed.

hcaes_string() allows passing aesthetics arguments as strings, it is rarely used, but in some situations it is a life-saver.

The minimal example below works fine in a fresh R session.

library(highcharter)
hchart(cars, type = "line", hcaes_string(x = "speed", y = "dist"))

However, if certain other packages are also loaded, the above will no longer work. So far I have discovered this to be the case with forecast and ggplot2. The error produced is connected to dplyr even when it is not loaded (but is installed in the library).

Error in `dplyr::mutate()`:
! Problem while computing `x = ~speed`.
x `x` must be a vector, not a `formula` object.

mgarbuzov avatar Mar 18 '24 10:03 mgarbuzov

Hi, I am encountering the same exact issue. Is there any updates on this?

EhsonGhandehari avatar Apr 04 '24 17:04 EhsonGhandehari