R wordcloud2 letterCloud showing only the background

Viewed 7158

My Rstudio version is 3.4.1 64-bit on Win10. I have installed the package wordcloud2 via the commands

install.packages('devtools')
devtools::install_github("lchiffon/wordcloud2")

And things went smoothly. Then I tried running the example from the official documentation on R console:

letterCloud(demoFreq, word='R')

Then what comes up is only the background colour, and nothing else at all. Web browser is Chrome 59.0 64-bit. However, the other function wordcloud works quite well.

I suppose this should be a common problem, so hopefully somebody can give me some help, thanks.

4 Answers

You can now reinstall it from GitHub using:

devtools::install_github("lchiffon/wordcloud2")

and it works well. :)

Refreshing works in my case. But sometimes when I try to save the image, the figure again disappears and doesn't appear again until I restart.

I have found changing the size of the font the best solution. If the fonts are too large for the margins of your shape it will not populate. Then hit refresh a couple of times.

Edited to add: what I think is going on is that when the Word Cloud is populating the words have to fit into the margins. So if some of them do not fit it stops. SO refreshing rearranges the word pattern. I make sure that I install these libraries along with wordcoud2


library("glue")
library("usethis")
library("htmltools")
library("rlang")
library("tm")
library("SnowballC")

library("usethis")
library("htmltools")
library("NLP")
library("tm")
library("RColorBrewer")
library("SnowballC")
library("wordcloud")
library("RColorBrewer")
library("pdftools")
library("plotly")
library("tidyverse")
library("jsonlite")
library("devtools")
devtools::install_github("lchiffon/wordcloud2", force=TRUE)
library("wordcloud2")
Related