I've got a sparse term list of the form

term1 doc1
term2 doc1
term3 doc2
etc.

I'd like to load this into a Corpus, as defined in the tm package. I was
thinking that one way to do this is to iterate over the list building up the i,
j, v vectors for a simple_triplet_matrix, and then to use that as an input to
as.TermDocumentMatrix.

Is that the best way to go? Any hints? Thanks in advance.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to