I'm using the following program:
library("wordcloud")
library("tm")
library("RColorBrewer")
dados=read.csv("C:/teste/dados.csv", sep=";", dec=",",header=TRUE)
capa=dados$mensagem
corpus <- VCorpus(VectorSource(capa))
corpus1 <- tm_map(corpus, stripWhitespace)
corpus2 <- tm_map(corpus1, tolower)
corpus2 <- tm_map(corpus2, removePunctuation)
wordcloud(corpus2, random.order = F, colors = brewer.pal(5, "Dark2"))
And it's giving the following error:
Error: inherits (doc, "TextDocument") is not TRUE