Is there a way to export word cloud generated by wordcloud2
package as html
automatically without having to manually click on Export
> Save as Web Page
(in RStudio)? Something like saving pdfs with pdf
and images with png
?
Here is the code to generate sample wordcloud
require(wordcloud2)
df = head(demoFreq,50)
wordcloud2(df)
require(wordcloud2)
df <- head(demoFreq, 5)
my_cloud <- wordcloud2(df)
my_path <- htmltools::html_print(my_cloud) # saves html in temp directory
print(my_path) # the location of the html file.
It would be best to swiftly move this file to a more permanent home.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With