[R] using inspect with a TermDocumentMatrix to convert to a data frame
erinm.hodgess at gmail.com
Fri Dec 5 04:53:19 CET 2014
I am working through the "Social Media Mining with R" book and I have
something that is a bit problematic.
Here is the code:
hash2_tdm <- TermDocumentMatrix(hash2_corpus)
hash3_tdm <- removeSparseTerms(hash2_tdm,0.92)
hash3.df <- as.data.frame(inspect(hash3_tdm))
Now when the hash3.df is created, the entire data frame is printed on the
console. That's ok if the data frame is relatively small, but is not
acceptable for a large data frame.
Has anyone run into this before, please? I have tried all kinds of other
options for converting to a data frame, but to no avail.
This is on R-3.1.2, on Ubuntu 14.0.4
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com
[[alternative HTML version deleted]]
More information about the R-help