Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
wordcloud中的脚注_R_Word Cloud - Fatal编程技术网

wordcloud中的脚注

wordcloud中的脚注,r,word-cloud,R,Word Cloud,见鬼, 我想做一个带标题的单词cloud和一个带日期的脚注 这是我的示例和代码: y<-c("the", "the", "the", "tree", "tree", "tree", "tree", "tree", "tree", "tree", "tree",

见鬼, 我想做一个带标题的单词cloud和一个带日期的脚注

这是我的示例和代码:

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")
y
library(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;