2014-09-25 26 views
0
tw_id<-read.delim('all_ids.tsv.chunk001') # contains only tweet ids 

tw_id[3] <- paste(c(1:nrow(tw_id))) #creating 3rd col to hold tweets 

    tweet_id<-paste(tw_id[1,2]) #pass 1st tweet id to variable 

    tweet<-showStatus(tweet_id) #pass 1st tweet into variable 

    do.call("rbind",lapply(tweet,as.data.frame)) # convert tweet into data frame 


Error in as.data.frame.default(X[[1L]], ...) : 
    cannot coerce class "structure("defaultBindingFunction", package = "methods")" to a data.frame 

如何轉換嘰嘰喳喳屬性的環境變量轉換成字符串/數字。不能強制型「環境」類型爲「字符」的載體 - 微博

已嘗試粘貼功能。同樣的錯誤。

需要它們的可讀格式與其他列一起。

謝謝。

+0

我看你很早以前就已經解決了你的問題,但是請改善措辭使其成爲可重複使用的資源,並避免downvoting。 – smci 2016-04-08 20:22:00

回答

2

我想傳遞整個環境變量,而我只是需要文本屬性。 現在解決它。

do.call("rbind", lapply(tweet$text, as.character)) 
相關問題