How to store r ggplot graph as html code snippet
问题 I am creating an html document by creating various objects with ggplotly() and htmltools functions like h3() and html() . Then I submit them as a list to htmltools::save_html() to create an html file. I would like to add ggplot charts directly as images, rather than attaching all the plotly bells and whistles. In the end, I will create a self-contained html file (no dependencies), and the plotly stuff would make that file excessively large. Is there some function that converts a ggplot object