Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Can not save plotly as HTML in R

I have R code with stopped to work with latest R package of plotly. It was working fine before.
Here is the code for example:

library(plotly)
library(htmlwidgets)

d <- diamonds[sample(nrow(diamonds), 1000), ]
p <- ggplot(data = d, aes(x = carat, y = price)) +
geom_point(aes(text = paste(“Clarity:”, clarity)), size = 4)
gg <- ggplotly§
htmlwidgets::saveWidget(gg, file = “index.html”)

check this… htmlwidgets::saveWidget(widget=p,“index.html”, selfcontained = FALSE)