这是我在清理语料库后的情况。
> wf
term num
1 compani 341
2 product 122
3 may 79
4 risk 48
5 result 46
6 market 45
7 oper 45
8 foreign 42
9 servic 41
10 compon 39
我试图像这样制作wordcloud
wordcloud(wf$term, wf$num)
这是一个错误:
Error in .Call("is_overlap", x11, y11, sw11, sh11, boxes1) :
"is_overlap" not resolved from current namespace (wordcloud)
无法想象那是什么。
这是dput(wf)的结果
structure(list(term = structure(c(199L, 200L, 1012L, 801L, 528L,
503L, 1010L, 1152L, 141L, 1177L), .Label = c("ability", "able",
"absolute", "acceptable", "acceptance", "access", "accessories",
"accidents", "accordingly", "account", "accounting", "accounts",
"accrual", "accrued", "accrues", "achieve", "acquire", "acquired",
"acquisitions", "across", "action", "actions", "activities",
"activity", "acts", "actual", "addition", "additional", "additionally",
"address", "addresses", "adequacy", "adequate",....), class = "factor"),
num = c(175, 159, 82, 79, 42, 39, 35, 34, 32, 32)), .Names = c("term",
"num"), row.names = c(NA, 10L), class = "data.frame")
答案 0 :(得分:1)
这是因为“ use.r.layout”的默认值为FALSE。我们需要按照以下方式更改wordcloud调用。
wordcloud(c(letters, LETTERS, 0:9), seq(1, 1000, len = 62),use.r.layout = TRUE)
如果我们添加use.r.layout = TRUE,那么问题将得以解决。