Hello, all
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:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] plotly_4.8.0.9000 ggplot2_3.0.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.18 later_0.7.5 pillar_1.3.0
[4] compiler_3.5.1 plyr_1.8.4 bindr_0.1.1
[7] tools_3.5.1 digest_0.6.17 jsonlite_1.5
[10] tibble_1.4.2 gtable_0.2.0 viridisLite_0.3.0
[13] pkgconfig_2.0.2 rlang_0.2.2 shiny_1.1.0
[16] rstudioapi_0.7 crosstalk_1.0.0 yaml_2.2.0
[19] bindrcpp_0.2.2 withr_2.1.2 dplyr_0.7.6
[22] httr_1.3.1 htmlwidgets_1.2 grid_3.5.1
[25] tidyselect_0.2.4 glue_1.3.0 data.table_1.11.6
[28] R6_2.2.2 purrr_0.2.5 tidyr_0.8.1
[31] magrittr_1.5 promises_1.0.1 scales_1.0.0
[34] htmltools_0.3.6 assertthat_0.2.0 xtable_1.8-3
[37] mime_0.5 colorspace_1.3-2 httpuv_1.4.5
[40] labeling_0.3 lazyeval_0.2.1 munsell_0.5.0
[43] crayon_1.3.4 Cairo_1.5-9
Any help will be greatly appreciated!