r语言 - 我不能用这个算法创建云



我正试图运行这段代码来创建我在类中看到的wordcloud。但我无法通过我尝试绘制单词云时出现的错误找到解决问题的方法。错误为:wordcloud中的错误(dfCorpus,max.words=100,random.order=FALSE(:不可能找到函数"0";wordcloud";。有人能帮忙吗?

install.packages("tm", "SnowballC", "worldcloud", "RColorBrewer")
library(tm, SnowballC,worldcloud,RColorBrewer)
df <- read.csv('C:/r_fundamentos/parte2/questoes.csv', sep = ",")
head(df)
dfCorpus <-Corpus(VectorSource(df$Question))
class(dfCorpus)
dfCorpus <- tm_map(dfCorpus, PlainTextDocument)
dfCorpus <- tm_map(dfCorpus,removePunctuation)
dfCorpus <- tm_map(dfCorpus, removeWords, stopwords("english"))
dfCorpus <- tm_map(dfCorpus, stemDocument)
dfCorpus <- tm_map(dfCorpus, removeWords, c("the", "this", c(stopwords("english"))))
wordcloud(dfCorpus, max.words = 100, random.order = FALSE)

我认为他没有加载所有的包。尝试:

图书馆(tm(;图书馆(SnowballC(;图书馆(worldcloud(;文库(RColorBrewer(

最新更新