corpus - using R how to draw wordcloud for my data -


i want make wordcloud of following dataframe (say df):

make        type       price ___________________________ subaru      hatchback   36 chevrolet   hatchback   53 mazda       truck       31 toyota      hatchback   39 mitsubishi  bus         41 honda       hatchback   42 nissan      sedan       37 dodge       hatchback   41 plymouth    hatchback   41 maruti      lorry       38 mitsubishi  hatchback   38 dodge       mini bus    38 plymouth    hatchback   38 

what doing follows:

library(tm) library(snowballc) library(wordcloud)  telecorpus <- corpus(vectorsource(df$type))  telecorpus <- tm_map(telecorpus, plaintextdocument)  wordcloud(telecorpus, max.words = 100, random.order = false) 

i want make more pretty , colorful.

can help, how in different way above???

try using following parameters change colors , layout:

wordcloud(telecorpus, scale=c(5,0.5), max.words=100, random.order=false, rot.per=0.35, use.r.layout=false, colors=brewer.pal(8, “dark2”)) 

also, if want remove words may follows:

telecorpus <- tm_map(telecorpus, removewords, “your_word_here”) 

source: https://georeferenced.wordpress.com/2013/01/15/rwordcloud/


Comments