Reputation: 1047
I'm trying to make a wordcloud with wordcloud2 from cran page (https://cran.r-project.org/web/packages/wordcloud2/vignettes/wordcloud.html) and I've downloaded it using the commands
install.packages('devtools')
devtools::install_github("lchiffon/wordcloud2")
I've got a dataframe most_words
:
> head(most_words)
word n
1 sir 8748
2 time 8100
3 miss 5976
4 hand 5787
5 dear 5486
6 head 5436
> dput(head(most_words))
structure(list(word = c("sir", "time", "miss", "hand", "dear",
"head"), n = c(8748L, 8100L, 5976L, 5787L, 5486L, 5436L)), .Names = c("word",
"n"), row.names = c(NA, 6L), class = "data.frame")
and a picture download.png
on my desktop
when I run the command for wordcloud2 without using the picture I get an answer
wordcloud2(head(most_words,100), size = 0.7, shape = 'star')
but when I try to put the wordcloud on the picture I just get an empty frame with no error
wordcloud2(head(most_words,100), figPath="/Users/username/Desktop/download.png" , size = .2, color = "skyblue")
Do you have any idea why this happens? (I suspect the problem is with figpath but i don't get any errors)
Upvotes: 2
Views: 3834
Reputation: 31
Try reloading the package:
library(devtools)
devtools::install_github("lchiffon/wordcloud2")
Upvotes: 1