tag:blogger.com,1999:blog-7958828565254404797.post182895669164922060..comments2024-03-28T07:44:59.527-07:00Comments on ListenData: Create WordCloud with RDeepanshu Bhallahttp://www.blogger.com/profile/09802839558125192674noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-7958828565254404797.post-57831882636157020172018-07-10T09:21:59.849-07:002018-07-10T09:21:59.849-07:00Would appreciate it if you could provide a link to...Would appreciate it if you could provide a link to the data file(s)?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-19596778973826434102016-03-04T05:38:17.375-08:002016-03-04T05:38:17.375-08:00i'm using word cloud in shiny , if i select th...i'm using word cloud in shiny , if i select the one data set it have to show the word cloud for corresponding to which i was selected.Anonymoushttps://www.blogger.com/profile/02578133913507514430noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-54864631664242068372016-03-04T05:38:11.017-08:002016-03-04T05:38:11.017-08:00can any one help me on this issues.can any one help me on this issues.Anonymoushttps://www.blogger.com/profile/02578133913507514430noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-49173075505363484472016-03-04T05:37:08.585-08:002016-03-04T05:37:08.585-08:00can any one help me on this issues.can any one help me on this issues.Anonymoushttps://www.blogger.com/profile/02578133913507514430noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-49271300094615037812016-03-04T05:36:04.773-08:002016-03-04T05:36:04.773-08:00i'm using word cloud in shiny , if i select th...i'm using word cloud in shiny , if i select the one data set it have to show the word cloud for corresponding to which i was selected.Anonymoushttps://www.blogger.com/profile/02578133913507514430noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-41745002111883792652016-02-17T20:54:42.311-08:002016-02-17T20:54:42.311-08:00Hi Deepanshu,
This code in Step 5
docs[[j]] = gsu...Hi Deepanshu,<br /><br />This code in Step 5<br />docs[[j]] = gsub("^\\s+|\\s+quot;, "", docs[[j]])<br /><br />missed the " after "^\\s+|\\s+quot;<br />Anonymoushttps://www.blogger.com/profile/17447719117394112011noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-78698161124874169522016-02-11T00:28:58.752-08:002016-02-11T00:28:58.752-08:00One more question, I increased my data points, mea...One more question, I increased my data points, means I included more comments in .csv file, but got only three word in word cloud.<br />Whether earlier there were too many words displayed in chart<br /><br />Why when I added more comments word cloud is showing less words in chartAnonymoushttps://www.blogger.com/profile/10703709156182925748noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-13486518388480199282016-02-10T10:27:03.845-08:002016-02-10T10:27:03.845-08:00Thanks a lot George, it does work perfectly.
Just...Thanks a lot George, it does work perfectly.<br /><br />Just one question about note mentioned, in the syntax and step <br /><br />Note : You can remove sparse terms with the following code :<br /> tdm.frequent = removeSparseTerms(tdm, 0.1)<br /><br />What is the use of this?<br /><br />Thanks a lot for your help<br />Anonymoushttps://www.blogger.com/profile/10703709156182925748noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-82979153943453222362016-02-10T09:24:58.121-08:002016-02-10T09:24:58.121-08:00Hi George,
I am sorry i didn't get your point...Hi George,<br /><br />I am sorry i didn't get your point. What exactly you have changed in the code -<br /><br />for (j in seq(docs))<br />{<br />docs[[j]] = gsub("(RT|via)((?:\\b\\W*@\\w+)+)", "", docs[[j]])<br />docs[[j]] = gsub("@\\w+", "", docs[[j]])<br />docs[[j]] = gsub("http\\w+", "", docs[[j]])<br />docs[[j]] = gsub("[ \t]{2,}", "", docs[[j]])<br />docs[[j]] = gsub("^\\s+|\\s+quot;, "", docs[[j]])<br />docs[[j]] = gsub("[^\x20-\x7E]", "", docs[[j]])<br />}<br />Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-78651769912990277382016-02-10T08:17:56.543-08:002016-02-10T08:17:56.543-08:00Issue with the version of tm you are using.
run t...Issue with the version of tm you are using.<br /><br />run the following command before running <br />tdm = TermDocumentMatrix(docs, control = kb.tf)<br /><br />docs <- tm_map(docs, PlainTextDocument)Anonymoushttps://www.blogger.com/profile/17447719117394112011noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-2456500703538783642016-02-10T04:08:22.574-08:002016-02-10T04:08:22.574-08:00Yes George, but in step 5 for next set of syntax I...Yes George, but in step 5 for next set of syntax I am getting below error, not sure why I am getting this error<br /><br />> tdm = TermDocumentMatrix(docs, control = kb.tf)<br />Error: inherits(doc, "TextDocument") is not TRUE<br />> <br />> # convert as matrix<br />> tdm = as.matrix(tdm)<br />Error in as.matrix(tdm) : object 'tdm' not found<br />> <br />> # get word counts in decreasing order<br />> word_freqs = sort(rowSums(tdm), decreasing=TRUE)<br />Error in is.data.frame(x) : object 'tdm' not found<br />> <br />> # create a data frame with words and their frequencies<br />> dm = data.frame(word=names(word_freqs), freq=word_freqs)<br />Error in data.frame(word = names(word_freqs), freq = word_freqs) : <br />object 'word_freqs' not foundAnonymoushttps://www.blogger.com/profile/10703709156182925748noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-28700381025856875452016-02-10T02:29:41.350-08:002016-02-10T02:29:41.350-08:00This is fantastic!!!
There is a small error in st...This is fantastic!!!<br /><br />There is a small error in step 5 (instead of " used ;)<br /><br /><br />for (j in seq(docs))<br />{<br /> docs[[j]] = gsub("(RT|via)((?:\\b\\W*@\\w+)+)", "", docs[[j]])<br /> docs[[j]] = gsub("@\\w+", "", docs[[j]])<br /> docs[[j]] = gsub("http\\w+", "", docs[[j]])<br /> docs[[j]] = gsub("[ \t]{2,}", "", docs[[j]])<br /><br /> docs[[j]] = gsub("^\\s+|\\s+quot;", "", docs[[j]])<br /><br /> docs[[j]] = gsub("[^\x20-\x7E]", "", docs[[j]])<br />}Anonymoushttps://www.blogger.com/profile/17447719117394112011noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-4376178602003905362016-02-10T00:19:18.959-08:002016-02-10T00:19:18.959-08:00The above error was resolved in step 5, but when I...The above error was resolved in step 5, but when I executed next set of syntax getting error. Please see below for more details. Can you please let me know why I am getting this error<br /><br /><br />> tdm = TermDocumentMatrix(docs, control = kb.tf)<br />Error: inherits(doc, "TextDocument") is not TRUE<br />> <br />> # convert as matrix<br />> tdm = as.matrix(tdm)<br />Error in as.matrix(tdm) : object 'tdm' not found<br />> <br />> # get word counts in decreasing order<br />> word_freqs = sort(rowSums(tdm), decreasing=TRUE)<br />Error in is.data.frame(x) : object 'tdm' not found<br />> <br />> # create a data frame with words and their frequencies<br />> dm = data.frame(word=names(word_freqs), freq=word_freqs)<br />Error in data.frame(word = names(word_freqs), freq = word_freqs) : <br /> object 'word_freqs' not foundAnonymoushttps://www.blogger.com/profile/10703709156182925748noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-13064473541350103142016-02-09T20:54:08.211-08:002016-02-09T20:54:08.211-08:00Hi Thanks for sharing this.
When I executed step ...Hi Thanks for sharing this.<br /><br />When I executed step 5 syntax I got below error<br /><br />Error: unexpected string constant in:<br />" docs[[j]] = gsub("^\\s+|\\s+quot;, "", docs[[j]])<br /> docs[[j]] = gsub(""<br />> }<br />Error: unexpected '}' in "}"Anonymoushttps://www.blogger.com/profile/10703709156182925748noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-15790010913868562552015-07-16T04:23:47.989-07:002015-07-16T04:23:47.989-07:00Hi !
Great work.
Well, I am trying to create a wor...Hi !<br />Great work.<br />Well, I am trying to create a word-cloud using tweets. But all it shows in the wordcloud is: object,class,status words<br />LINK to screenshot: https://drive.google.com/file/d/0B4ZhibK97rv0SE9XOXgwOERYNjQ/view?usp=sharing <br />Help appreciated.<br />ThanksJigyasa Groverhttps://www.blogger.com/profile/15017211863658647460noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-75868273471706847532015-06-26T07:40:49.194-07:002015-06-26T07:40:49.194-07:00Hey, I am using your code, but I can't do my o...Hey, I am using your code, but I can't do my own stopwords. I want to do a wordcloud of a chat and specify some words that shouldn't go into the wordcloud. Can you please tell me how to get my own words into stopwords? Thank you in advanceMalte Rnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-11574758638443666282015-04-06T10:55:23.711-07:002015-04-06T10:55:23.711-07:00May i know the section of the code which returns t...May i know the section of the code which returns this error?Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-34549427304190164932015-04-05T22:20:03.914-07:002015-04-05T22:20:03.914-07:00Hi Deepanshu
I followed your steps but I got the ...Hi Deepanshu<br /><br />I followed your steps but I got the following error...please help<br /><br /><br />Error in eval(expr, envir, enclos) : object 'word' not foundSantanu Dashttps://www.blogger.com/profile/14054719070844470812noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-68234138602821441932015-02-12T05:17:38.494-08:002015-02-12T05:17:38.494-08:00I have updated the code. That should solve your pr...I have updated the code. That should solve your problem.Thanks!Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-56351643381560773592015-02-11T19:45:05.869-08:002015-02-11T19:45:05.869-08:00Hi, I followed all the steps but failed to transfo...Hi, I followed all the steps but failed to transform a sentence into a short term. Which is step 5,8<br />I got the error message: <br />Error in UseMethod("content", x) : <br /> no applicable method for 'content' applied to an object of class "character"<br /><br />I can run all Step 1 to Step 4 till now.<br /><br />Could you help me fix this problem? <br />Thank you in advance.<br />Ice Cream Hit Earthhttps://www.blogger.com/profile/06854359045797177528noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-41833084593334663512014-11-30T10:18:46.507-08:002014-11-30T10:18:46.507-08:00Thank you! Glad you liked it :-)Thank you! Glad you liked it :-)Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-7695721513160646002014-11-24T05:54:01.347-08:002014-11-24T05:54:01.347-08:00I follow your tutorial and I tried to make a word ... I follow your tutorial and I tried to make a word cloud using "I have a dream" text from M. Luther King. <br /><br />Your post is clear and amazing because I was able to reproduce it. Thank you!<br /><br />http://www.sthda.com/english/wiki/easyggplot2Anonymoushttps://www.blogger.com/profile/12687824670751091732noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-72039616230679599782014-11-24T04:25:42.069-08:002014-11-24T04:25:42.069-08:00Awesome article.Awesome article.vickiehttps://www.blogger.com/profile/12265676138250400608noreply@blogger.com