如何确保wordcloud2::wordcloud2()的输出出现在我的RMarkdown (RMarkdown)文档中?
它在RStudio中呈现得很好,包括在RMarkdown文档的预览中,但是当我用blogdown将它上传到netlify站点时,它不会显示(见文章底部的这里 )。有什么想法吗?
编辑:这是我正在使用的代码。就像我说的,它在RStudio中运行得很好,只是在网站上没有。
library(tidyRSS)
five38 <- tidyfeed("http://fivethirtyeight.com/all/feed")
library(wordcloud2)
topics <- five38$item_category1 %>% append(five38$item_category2) %>%
append(five38$item_category3) %>%
append(five38$item_category4) %>%
append(five38$item_category5)
Topics <- data_frame(
words = topics
) %>%
filter(!is.na(words)) %>%
group_by(words) %>%
tally()
wordcloud2(Topics)发布于 2017-12-21 17:50:00
```{r}库(Htmlwidget)
Install.packages(“网照”)
webshot::install_phantomjs()
图书馆(Wordcloud2)
hw = wordcloud2(demoFreq,size = 3)
saveWidget(hw,"1.html",自包含= F)
网射::web快照(“1.html”、"1.png“、vwidth = 700、vheight = 500、delay =10)
好的,我从wordcloud2的作者那里找到了解决这个问题的方法。
https://stackoverflow.com/questions/46105141
复制相似问题