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 2 years ago • 1 comments

Using the minimal example, in a fresh R session:

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

The above example works fine. However, if certain packages are loaded prior to highcharter, the code breaks down and no longer works. I have so far discovered this to be the case with forecast and ggplot2. Weirdly enough, the error displayed is

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

...while dplyr hasn't been loaded (but I have it installed in the package library). This must be because popular packages have many dependencies, and those dependencies have their own dependencies and so on, so not sure how easy the problem is to pin-point and fix. However, it only affects hcaes_string(). The version with normal hcaes() works fine without any conflicts.

mgarbuzov avatar Jul 06 '22 13:07 mgarbuzov

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Feel free to reopen it if you find it necessary.

stale[bot] avatar Aug 07 '23 04:08 stale[bot]