我能夠在str.default(tweets_text)
與轉換爲字符下面的代碼我收到錯誤時獲得500個鳴叫在與R但是:無效的多字節字符串53錯誤str.default(tweets_text):無效的多字節字符串53
tweets_b <-searchTwitter('bahubali',lang="en",n=500,resultType="recent")
tweets_txt <-sapply(tweets_b,function(x) x$getText())
str(tweets_txt)
有人可以幫我嗎?
什麼包您使用的歡呼?請添加庫調用 –
庫(Twitter)上 庫(RCurl) 庫(httk) 庫(httpuv)要求(TM) 要求(wordcloud)tweets_b <-searchTwitter( 「#bahubali」,LANG = 「EN」, N = 500,與resultType = 「最近」) 類(tweets_b) #convert在從列表數據類型文本 tweets_txt <-sapply(tweets_b,函數(X)×$的getText()) STR(tweets_text) b_corpus <-Corpus(VectorSource(tweets_text)) –
您可以檢查並確認錯誤信息 –