twitter - R tm In mclapply(content(x), FUN, ...) : all scheduled cores encountered errors in user code -


When I run the following code for the first line from the end, I got the warning message:

In mclapply (content (x), fun, ...): All scheduled core errors occurred in the user code

When I run the last line, I got < / P>

\ "character \" \ n "attr (," class ") There is no applicable method for the 'word' applied to the object of the" try-error "class.

I I start learning R. and I will appreciate your help.

(DevTools) install_github ("Twitter", user name = "geoffjentry") library (Twitter) setup_twitter_oauth ("API key "," API Secret ") rdmTweets & lt; - userTimeline ('rdatamining', n = 200) (nDocs & lt; - length (rdmTweets)) for rdmTweets [11:15] (11:15 i) (Paste ("[[,", "," "]" September = "")) + writeLines (strwrap (rdmTweets [[I]] $ gettext (), width = 73))} df & lt; - do.call ("rbind", lapply (rdmTweets, as.data.frame)) Dim (df) library (TM) library (RWeka) library (rJava) library (RWekajars) myCorpus & lt; - Corpus (VectorSource (df $ text) myCorpus & lt; - tm_map (myCorpus, tolower) myCorpus & lt; - tm_map (myCorpus, removePunctuation) myCorpus & lt; - tm_map (myCorpus, removeNumbers) removeURL & lt; - Function (x) gsub ("http [[:: alnum:]] *", "", x) myCorpus & lt; - tm_map (myCorpus, removeURL) myStopwords & lt; --C (Stopwords ("English"), "Available", "MyStopwords" & lt; - setdiff (myStopwords, c ("r", "large") myCorpus & lt; - tm_map (myCorpus, RemoveWords, myStopwords) myCorpusCopy & lt; - myCorpu's myCorpus & lt; - tm_map (myCorpus, stemDocument) {for cat (paste ("[[[,", ","]] "September =" ") + writeLines (strwrap (myCorpus [[i]], Width = 73))} myCorpus & lt; Inspection of tm_map (myCorpus, stemCompletion, dictionary = myCorpusCopy) (myCorpus [11:15]) sessionInfo () R Version 3.1.1 (2014-07-10) Platform: x86_64- apple darwin13.1.0 (64-bit) Location: [1] en_GB.UTF-8 / en_GB.UTF-8 / en_GB.UTF-8 / c / en_GB.UTF-8 / en_GB.UTF-8 Attached Base Packages: [1] Statistics Graphics GrDevices Utils Dataset Methods [ 7] Base other affiliated packages: [1] RWekajars_3.7.11-1 rJava_0.9-6 RWeka_0.4-23 [4] SnowballC_0.5 tm_0.6 NLP_0.1- 3 [7] twitteR_1.1.8 devtools_1.5 One Name Loaded through space (and not attached): [1] bit_1.1-12 bit64_0.9-4 digest_0.6.4 evaluate_0.5.5 [5] grid_3.1.1 httr_0.4 memoise_0. 2.1 parallel_3.1.1 [9] RCurl_1.95-4.1 rjson_0.2.14 slam_0.1-32 stringr_0.6.2 [13] tools_3.1.1 whisker_0.3-2
  myCorpus  

Lazy = TRUE). MyCorpus & lt; -. Tm_map (myCorpus, tolower, lazy = TRUE) etc.

I think the new TM package is required explicitly


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -