![]() # max.words : Maximum number of words to be plotted. # min.freq : words with frequency below min.freq will not be plotted # colorPalette : the name of color palette taken from RColorBrewer package, # textStemming : reduces words to their root form # excludeWords : a vector of words to exclude from the text # type : specify whether x is a plain text, a web page url or a file path # x : character string (plain text, web url, txt file path) # rquery.wordcloud() : Word cloud generator The above image clearly shows that “Will”, “freedom”, “dream”, “day” and “together” are the five most frequent words in Martin Luther King “ I have a dream speech”. Res<-rquery.wordcloud(filePath, type ="file", lang = "english", max.words : maximum number of words to be plotted.Res<-rquery.wordcloud(filePath, type ="file", lang = "english")Ĭhange the arguments max.words and min.freq to plot more words : Generate the word cloud using the R code below : source('') Copy and paste your text in a plain text file.“ I have a dream speech” (from Martin Luther King) is processed in the following example but you can use any text you want : Plain text file can be easily created using your favorite text editor (e.g : Word). ![]() least frequent terms droppedĬreate a word cloud from a plain text file
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |