我目前将 wordle 用于词云的许多艺术用途。我认为 R 的词云可能具有更好的控制力。
1)如何在词云中保持单词大写?[解决了]
2) 如何在 wordcloud 中将两个单词保持为一个块?(wordle 使用 ~ 运算符来完成此操作,R 的词云仅按原样打印 ~)[例如,在“to”和“be”之间有一个 ~ 我想在词云中留一个空格]
require(wordcloud)
y<-c("the", "the", "the", "tree", "tree", "tree", "tree", "tree",
"tree", "tree", "tree", "tree", "tree", "Wants", "Wants", "Wants",
"Wants", "Wants", "Wants", "Wants", "Wants", "Wants", "Wants",
"Wants", "Wants", "to~be", "to~be", "to~be", "to~be", "to~be",
"to~be", "to~be", "to~be", "to~be", "to~be", "to~be", "to~be",
"to~be", "to~be", "to~be", "to~be", "to~be", "to~be", "to~be",
"to~be", "when", "when", "when", "when", "when", "familiar", "familiar",
"familiar", "familiar", "familiar", "familiar", "familiar", "familiar",
"familiar", "familiar", "familiar", "familiar", "familiar", "familiar",
"familiar", "familiar", "familiar", "familiar", "familiar", "familiar",
"leggings", "leggings", "leggings", "leggings", "leggings", "leggings",
"leggings", "leggings", "leggings", "leggings")
wordcloud(names(table(y)), table(y))