wordcloud中的脚注
见鬼, 我想做一个带标题的单词cloud和一个带日期的脚注 这是我的示例和代码:wordcloud中的脚注,r,word-cloud,R,Word Cloud,见鬼, 我想做一个带标题的单词cloud和一个带日期的脚注 这是我的示例和代码: y<-c("the", "the", "the", "tree", "tree", "tree", "tree", "tree", "tree", "tree", "tree",
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")
layout(matrix(c(1,2,3), nrow=3, ncol=1), heights=c(1,4,1))
par(mar=rep(0,4,))
plot.new()
text(x=0.5,y=0.5, "Title")
set.seed(1234) # for reproducibility
wordcloud(names(table(y)), table(y))
text(x=0.5,y=0.5, "Date 20200629")
ylibrary(wordcloud)
Y
library(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")
layout(matrix(c(1,2,3), nrow=1, ncol=1), heights=c(1,4,1))
par(mar=rep(0,4,))
plot.new()
set.seed(1234) # for reproducibility
wordcloud(names(table(y)), table(y))
text(x=0.5,y=1, "Title") # y=0 bottom; y=0.5 middle; y=1 upper; x=0 left; x=0.5 middle; x=1 right;
text(x=0.5,y=0, "Date 20200629") # y=0 bottom; y=0.5 middle; y=1 upper; x=0 left; x=0.5 middle; x=1 right;