2014-09-25 7 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 

어떻게 트위터 속성을 환경 변수를 문자열/숫자로 변환합니까?유형 '환경'을 '문자'유형의 벡터로 강요 할 수 없습니다. - Twitter

붙여 넣기 기능을 시도했습니다. 같은 오류.

다른 열과 함께 읽을 수있는 형식이어야합니다.

감사합니다.

+0

오래 전 귀하의 질문을 이미 풀어 봤지만 재사용 가능한 리소스로 만들고 다운 투표를 피하려면 문구를 개선하십시오. – smci

답변

2

단순히 텍스트 속성이 필요한 동안 전체 환경 변수를 전달하려고했습니다. 지금 해결되었습니다.

do.call("rbind", lapply(tweet$text, as.character)) 
관련 문제