有没有一种方法可以自动将wordcloud2包生成的word云导出为html,而不必手动单击Export > Save as Web Page (在RStudio中)?比如用pdf保存pdf,用png保存图片
下面是生成示例单词云的代码
require(wordcloud2)
df = head(demoFreq,50)
wordcloud2(df)发布于 2017-01-27 08:08:05
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.最好是快速地将此文件移动到一个更永久的主目录。
https://stackoverflow.com/questions/41884336
复制相似问题