I've just installed RTextTools and on Windows 7 (R v. 2.15.1) and am trying to work through the introductory example. I have encountered several errors in just trying to load and create a corpus:
1. matrix <- create_matrix(cbind(data$text), language="english", removeNumbers=T, removeSparseTerms=.998)
Error in slam:::`[.simple_triplet_matrix`(x, i, j, ...) :
Invalid subscript type: NULL.
In addition: Warning messages:
1: In
is.na(x) :
is.na() applied to non-(list or vector) of type 'NULL'
2: In
is.na(x) :
is.na() applied to non-(list or vector) of type 'NULL'
I will note that taking out the "removeNumbers=T" bit makes it work, but obviously I'd like to remove them in real data at times.
2. Apparently create_corpus cannot be found:
corpus <- create_corpus(matrix, as.numeric(data$major), trainSize=1:750, testSize=751:1000, virgin=F)
Error: could not find function "create_corpus"
even though the library is loaded and in my namespace.
Any explanation/fixes?