“RTextTools” create_matrix got an error
问题 I was running RTextTools package to build a text classification model. And when I prepare the prediction dataset and tried to transform it in to matrix. I got error as: Error in if (attr(weighting, "Acronym") == "tf-idf") weight <- 1e-09 : argument is of length zero My code is as below: table<-read.csv("traintest.csv",header = TRUE) dtMatrix <- create_matrix(table["COMMENTS"]) container <- create_container(dtMatrix, table$LIKELIHOOD_TO_RECOMMEND, trainSize=1:5000,testSize=5001:10000, virgin