tm - R Error GoogleNewsSource inherits(x, "Source") is not TRUE -


i using tm , tm.plugin.webmining package try read in goggle news , basic analysis on them. however, facing problem @ beginning:

googlenewscorpus <- corpus (googlenewssource("google")) 

i following error:

error: inherits(x, "source") not true 

please help. using r version 3.1, r studio version 0.98.1091, tm version 0.6, , tm.plugin.webmining version 1.2.2.

solved! cast result webcorpus:

gnewscorpus <- webcorpus(googlenewssource("google")) 

i can use subsequent 'tm' analysis:

data <- tm_map(gnewscorpus,removewords, stopwords("english")) ... 

a related question though: after have done analysis, created term-document matrix, clustered using hclust(), how put news headings in cluster dendogram?

... tdm <- termdocumentmatrix(data) h <- hclust(dist(t(tdm),method="cosine")) plot(h) 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -