How can I make sure that the output of wordcloud2::wordcloud2()
appears in my RMarkdown (HTML) document?
It renders fine in RStudio, including in the preview of the RMarkdown document, but when I upload it to my netlify site with blogdown, it doesn't show (see here, bottom of the post). Any ideas?
Edit: here's the code I'm using. Like I said, it works perfectly in RStudio, just not on the website itself.
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)
ok, i found this way to solve this problem from the author of wordcloud2.