geneorama
geneorama

Reputation: 3720

Leaflet maps not working in R Studio after R 4.0.0 upgrade

I updated my computer the other day (R, R Tools, and RStudio), and leaflet stopped working.

When I run this example in the RGUI it's very slow, but eventually it opens a web page in a browser.

When I run it in R Studio it's very slow, eventually the command finishes but nothing appears in the "view" tab, and R Studio keeps using more and more memory until I force kill it.

library(leaflet)

leaflet() %>% addTiles() %>% addMarkers(lng=174.768, lat=-36.852, popup="R")

I've tried a few things with my path, and installing leaflet from github, but there's not much to troubleshoot.

> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 15063)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.0 tools_4.0.0

Edit 2020-05-09:

I reverted to R 3.6.2 and am no longer having the issue. Fortunately I could change it in R Studio's options so I can switch back to 4.0 if that becomes necessary.

I'm not adding this as an answer because it's a work around.

Upvotes: 1

Views: 1420

Answers (1)

tenjik san
tenjik san

Reputation: 31

Rstudio viewer problem has been adressed.

Rstudio developer :

This is a known issue with R 4.0.0 (exactly) that has been fixed by the R team in R 4.0.2.

see full post here: https://community.rstudio.com/t/rstudio-viewer-session-viewhtml-not-found/75592

Upvotes: 1

Related Questions