有没有办法自动导出wordcloud2包生成的文字云html而无需手动点击Export> Save as Web Page(在RStudio中)?像保存pdf pdf和图像一样png?
这是生成示例wordcloud的代码
require(wordcloud2)
df = head(demoFreq,50)
wordcloud2(df)
Run Code Online (Sandbox Code Playgroud)
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.
Run Code Online (Sandbox Code Playgroud)
最好迅速将此文件移动到更永久的家中.
| 归档时间: |
|
| 查看次数: |
777 次 |
| 最近记录: |