小编bt3*_*bt3的帖子

htmlwidgets::saveWidget() 中已弃用参数“selfcontained”

当我[WARNING] Deprecated: --self-contained. use --embed-resources --standalone使用htmlwidgets::saveWidget(..., selfcontained = TRUE).

我不知道如何使用“嵌入资源”或“独立”作为函数中的参数。这只是最近开始的,想知道是否有其他人发生过此警告,或者知道为此使用的正确参数。更新了 RStudio 和软件包,但警告仍然存在。

使用 R 4.2.1、RStudio 2022.07.2+576“斑点 Wakerobin”、htmlwidgets1.5.4。

library(plotly)
library(htmlwidgets)

fig <- plot_ly(x = 1:10, y = 1:10, type = "scatter", mode = "lines")
htmlwidgets::saveWidget(partial_bundle(fig), file = "plotly.html", selfcontained = TRUE)
utils::browseURL("plotly.html")
Run Code Online (Sandbox Code Playgroud)

html r plotly htmlwidgets

10
推荐指数
1
解决办法
3533
查看次数

标签 统计

html ×1

htmlwidgets ×1

plotly ×1

r ×1