I have a curious error which only happens in my colleagues RStudio when they run the code. The code is dealing with text corpus, and this is what I do:
ap.corpus <- corpus(raw.data$text)
ap.corpus
#Corpus consisting of 214,226 documents and 0 docvars.
ap.corpus <- Corpus(VectorSource(ap.corpus))
ap.corpus <- tm_map(ap.corpus,tolower)
ap.corpus<-corpus(ap.corpus)
The last step is just reformatting before I get to the model. I run this code smoothly with no issues. My to colleagues, on the other hand, try to run exactly same code on exactly the same data and get the following error after ap.corpus<-corpus(ap.corpus: nrow(docvars)==length(x) is not TRUE
We tried to reboot R studio, tried to run on a smaller corpus (only 500 doc), still same error. Hoping anyone else experienced similar error. This one doesn't appear to be the code issue, as I never experienced such error running this or similar codes in my RStudio. Note: my colleague also ran the code in R, avoiding RStudio. Same issue.