I keep getting [WARNING] Deprecated: --self-contained. use --embed-resources --standalone
when saving a plotly plot as a self-contained html widget, using htmlwidgets::saveWidget(..., selfcontained = TRUE)
.
I can't figure out how to use "embed-resources" or "standalone" as arguments in the function. This just recently started, wondering if anyone else has had this warning occur, or knows the proper arguments to use for this. Updated RStudio and the package, but the warning persists.
Using R 4.2.1, RStudio 2022.07.2+576 "Spotted Wakerobin", htmlwidgets
1.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")