安装 R 4.0.0 后无法显示 mapview 输出
Cannot display mapview output after installing R 4.0.0
我安装了 R 4.0.0 后,无法在 RStudio 的查看器中显示 mapview
输出。如果有人能给我一些提示来解决这个问题,那就太好了。
这是一个示例代码。
library(mapview)
mapview(breweries)
这是我的 RStudio Viewer 的屏幕截图。没有错误消息,但查看器只是一片空白。
这是我的会话信息,我使用的是 RStudio 版本 1.1.442
。
sessionInfo()
# R version 4.0.0 (2020-04-24)
# Platform: x86_64-w64-mingw32/x64 (64-bit)
# Running under: Windows >= 8 x64 (build 9200)
#
# Matrix products: default
#
# locale:
# [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
# [4] LC_NUMERIC=C LC_TIME=English_United States.1252
#
# attached base packages:
# [1] stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] mapview_2.7.8
#
# loaded via a namespace (and not attached):
# [1] Rcpp_1.0.4.6 RColorBrewer_1.1-2 compiler_4.0.0 base64enc_0.1-3 class_7.3-17
# [6] tools_4.0.0 digest_0.6.25 uuid_0.1-4 jsonlite_1.6.1 satellite_1.0.2
# [11] lifecycle_0.2.0 lattice_0.20-41 viridisLite_0.3.0 png_0.1-7 rlang_0.4.6
# [16] DBI_1.1.0 crosstalk_1.1.0.1 yaml_2.2.1 e1071_1.7-3 raster_3.1-5
# [21] leaflet.providers_1.9.0 gdtools_0.2.2 htmlwidgets_1.5.1 systemfonts_0.2.3 stats4_4.0.0
# [26] classInt_0.4-3 leaflet_2.0.3 grid_4.0.0 webshot_0.5.2 svglite_1.2.3
# [31] sf_0.9-3 R6_2.4.1 sp_1.4-2 leafpop_0.0.5 magrittr_1.5
# [36] scales_1.1.1 codetools_0.2-16 htmltools_0.4.0 units_0.6-6 colorspace_1.4-1
# [41] brew_1.0-6 KernSmooth_2.23-17 munsell_0.5.0 leafem_0.1.1
这似乎是 Windows 上 RStudio
、R
和 leaflet
版本的某些组合的问题,请参阅这些 GitHub 问题:
- Viewer Pane not working 用于 RStudio
- Leaflet maps don't appear in RStudio Viewer Pane (Windows + R v4.0) 传单
尝试升级您的 RStudio,也许它会有所帮助(至少他们说它已针对 RStudio v1.3.957-1 修复)。
我安装了 R 4.0.0 后,无法在 RStudio 的查看器中显示 mapview
输出。如果有人能给我一些提示来解决这个问题,那就太好了。
这是一个示例代码。
library(mapview)
mapview(breweries)
这是我的 RStudio Viewer 的屏幕截图。没有错误消息,但查看器只是一片空白。
这是我的会话信息,我使用的是 RStudio 版本 1.1.442
。
sessionInfo()
# R version 4.0.0 (2020-04-24)
# Platform: x86_64-w64-mingw32/x64 (64-bit)
# Running under: Windows >= 8 x64 (build 9200)
#
# Matrix products: default
#
# locale:
# [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
# [4] LC_NUMERIC=C LC_TIME=English_United States.1252
#
# attached base packages:
# [1] stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] mapview_2.7.8
#
# loaded via a namespace (and not attached):
# [1] Rcpp_1.0.4.6 RColorBrewer_1.1-2 compiler_4.0.0 base64enc_0.1-3 class_7.3-17
# [6] tools_4.0.0 digest_0.6.25 uuid_0.1-4 jsonlite_1.6.1 satellite_1.0.2
# [11] lifecycle_0.2.0 lattice_0.20-41 viridisLite_0.3.0 png_0.1-7 rlang_0.4.6
# [16] DBI_1.1.0 crosstalk_1.1.0.1 yaml_2.2.1 e1071_1.7-3 raster_3.1-5
# [21] leaflet.providers_1.9.0 gdtools_0.2.2 htmlwidgets_1.5.1 systemfonts_0.2.3 stats4_4.0.0
# [26] classInt_0.4-3 leaflet_2.0.3 grid_4.0.0 webshot_0.5.2 svglite_1.2.3
# [31] sf_0.9-3 R6_2.4.1 sp_1.4-2 leafpop_0.0.5 magrittr_1.5
# [36] scales_1.1.1 codetools_0.2-16 htmltools_0.4.0 units_0.6-6 colorspace_1.4-1
# [41] brew_1.0-6 KernSmooth_2.23-17 munsell_0.5.0 leafem_0.1.1
这似乎是 Windows 上 RStudio
、R
和 leaflet
版本的某些组合的问题,请参阅这些 GitHub 问题:
- Viewer Pane not working 用于 RStudio
- Leaflet maps don't appear in RStudio Viewer Pane (Windows + R v4.0) 传单
尝试升级您的 RStudio,也许它会有所帮助(至少他们说它已针对 RStudio v1.3.957-1 修复)。