You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级R 4.4.0后R Studio Viewer无法渲染htmlwidgets类可视化

问题描述

升级至R 4.4.0后,依赖htmlwidgets库的leaflet、echarts4r、highcharter等多款数据可视化工具,无法在R Studio Viewer面板中渲染,但在旧版本R 4.3.3中可正常显示。将结果保存为HTML页面后打开,可视化内容能正常工作。

通过开发者工具排查发现:页面数据存在,但多个.js资源加载报错Failed to load resource: net::ERR_SOCKET_NOT_CONNECTED。已将R Studio升级至「Chocolate Cosmos」版本(RStudio/2024.04.0+735),问题仍未解决。

示例代码

library(highcharter)

hchart(
  citytemp_long,
  "line",
  hcaes(x = month, y = temp, group = city)
)

sessionInfo() 信息

sessionInfo()
#> R version 4.4.0 (2024-04-24 ucrt)
#> Platform: x86_64-w64-mingw32/x64
#> Running under: Windows 10 x64 (build 19045)
#> 
#> Matrix products: default
#> 
#> 
#> locale:
#> [1] LC_COLLATE=English_United States.utf8 
#> [2] LC_CTYPE=English_United States.utf8   
#> [3] LC_MONETARY=English_United States.utf8
#> [4] LC_NUMERIC=C                         
#> [5] LC_TIME=English_United States.utf8    
#> 
#> time zone: America/Chicago
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] styler_1.10.2     digest_0.6.35     fastmap_1.1.1     xfun_0.43        
#>  [5] magrittr_2.0.3    glue_1.7.0        R.utils_2.12.3    knitr_1.46       
#>  [9] htmltools_0.5.8.1 rmarkdown_2.26    lifecycle_1.0.4   cli_3.6.2        
#> [13] R.methodsS3_1.8.2 vctrs_0.6.5       reprex_2.1.0      withr_3.0.0      
#> [17] compiler_4.4.0    R.oo_1.26.0       R.cache_0.16.0    purrr_1.0.2      
#> [21] rstudioapi_0.16.0 tools_4.4.0       evaluate_0.23     yaml_2.3.8       
#> [25] rlang_1.1.3       fs_1.6.4

(2024-05-01 使用 reprex v2.1.0 创建)


内容的提问来源于stack exchange,提问作者cristian-vargas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 16:13:14