dcomtois / summarytools

R Package to Quickly and Neatly Summarize Data
504 stars 77 forks source link

Conflict between summarytools and highcharter packages #98

Closed sorathpanzer closed 3 years ago

sorathpanzer commented 4 years ago

First of all, this is such a nice package, congratulation.

I have been writting some R code for stock analysis, which as also the highcharter library, and i have been facing some kind of incompatibility between the highcharter and the summary tools library. I don't know if the problem is in the summary tools or in the highcharter, for that reason i will also submit the same experience in the highcharter github.

The short description of the problem: The problem that i face is, when i execute the whole R script with the summarytools library with the highcharter at the first execution no problem, but when i try to re-execute the highcharter code a second or a third time it gives blank.

A more precise description of the problem: When execute the overall script, you can do it with no problem what so ever many times you want, but when i specifically try to execute the specific highcharter code at the second or third time it becomes blank and stuck. If i execute the script without the summarytools, the problem disapear

I give this non reproducible example:

`library(summarytools) library(highcharter)

highchart(type = "stock") %>% hc_add_series(EURUSD)`

I hope this is relevant. Keep the nice work.

dcomtois commented 4 years ago

Hi, thanks for the feedback, always appreciated. I'm not familiar with the highcharter package... If you could set up a small reproducible example (using a built-in dataset), that would be very helpful.

In the meantime, a workaround would be to unload the summarytools package when necessary:

detach("package:summarytools")

# If the problem persists, you can also try this
detach("package:summarytools", unload=TRUE)
sorathpanzer commented 4 years ago

I made this reproducible example, run it first without loading the summarytools, you'll verify that the chart will load everytime, but with the summarytools it open blank. I hpe this example helps.

library(quantmod) library(magrittr) library(dplyr) library(highcharter) library(summarytools)

x <- getSymbols("GOOG", auto.assign = FALSE)

highchart(type = "stock") %>% hc_add_series(x)

dcomtois commented 4 years ago

Hi Sorath,

Doing a clean-up of older issues, I just realized I never replied to you, sorry about that! In fact I wasn't able to reproduce the issue... The blank graph or hanging just doesn't happen on my machine. Do you still experience the same thing on your side?

dcomtois commented 3 years ago

Closing for now, let me know if the problem still occurs. Thx.