[R] Need your favour : twitter sentiment issue while cleaning the corpus
Sandeep Rana
sunnysingha.analytics at gmail.com
Tue Feb 16 12:52:16 CET 2016
Hi,
I need your favour. I received below warning while cleaning the corpus of tweets which is not allowing me to further the analysis:
Warning message:
In mclapply(content(x), FUN, ...) :
scheduled core 1 encountered error in user code, all values of the job will be affected
Code used: for cleaning.
tw_clean <- tm_map(tw_corpus, removePunctuation)
tw_clean <- tm_map(tw_clean, content_transformer(tolower))
tw_clean <- tm_map(tw_clean, removeWords, stopwords('english'))
tw_clean <- tm_map(tw_clean, removeNumbers)
tw_clean <- tm_map(tw_clean, stripWhitespace)
Code used to create the corpus:
tw_corpus <- Corpus(VectorSource(tw_text))
The error is raised for each of the above line of code.
I some how found a way to ignore the error/warning message by including ‘lazy=TRUE’ argument in the tm_map() function
but when attempted to view the wordcloud(tw_clean) below error is raised with the same warning.
Error in UseMethod("meta", x) :
no applicable method for 'meta' applied to an object of class "try-error"
In addition: Warning message:
In mclapply(unname(content(x)), termFreq, control) :
scheduled core 1 encountered error in user code, all values of the job will be affected
Regards,
Sunny Singha
[[alternative HTML version deleted]]
More information about the R-help
mailing list