I am trying plotly with ggplot2 for the first time. When I run the following code and try to zoom in or out, RStudion crashes and closes down.
library(magrittr) library(ggplot2) library(plotly) data(mpg) graf <- mpg %>% ggplot(aes(x=displ, y= hwy, color = factor(cyl))) + geom_point() graf <- ggplotly(graf) graf
I am using the latest versions of R (3.5.1), RStudio (1.1.456) and Plotly (installed from CRAN and github). I also updated all the installed packages.
The code works fine if I run it directly in R. I can zoom in and out, resize the plot, etc. In RStudio, when I try it, RStudio freezes briefly and shuts down.
Here is the session info:
> sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale:  LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252  LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C  LC_TIME=Portuguese_Brazil.1252 attached base packages:  stats graphics grDevices utils datasets methods base other attached packages:  plotly_188.8.131.5200 ggplot2_3.0.0 loaded via a namespace (and not attached):  Rcpp_0.12.18 later_0.7.5 pillar_1.3.0  compiler_3.5.1 plyr_1.8.4 bindr_0.1.1  tools_3.5.1 digest_0.6.17 jsonlite_1.5  tibble_1.4.2 gtable_0.2.0 viridisLite_0.3.0  pkgconfig_2.0.2 rlang_0.2.2 shiny_1.1.0  rstudioapi_0.7 crosstalk_1.0.0 yaml_2.2.0  bindrcpp_0.2.2 withr_2.1.2 dplyr_0.7.6  httr_1.3.1 htmlwidgets_1.2 grid_3.5.1  tidyselect_0.2.4 glue_1.3.0 data.table_1.11.6  R6_2.2.2 purrr_0.2.5 tidyr_0.8.1  magrittr_1.5 promises_1.0.1 scales_1.0.0  htmltools_0.3.6 assertthat_0.2.0 xtable_1.8-3  mime_0.5 colorspace_1.3-2 httpuv_1.4.5  labeling_0.3 lazyeval_0.2.1 munsell_0.5.0  crayon_1.3.4 Cairo_1.5-9
Any help will be greatly appreciated!