How to convert searchTwitter results (from library(twitteR)) into a data.frame?

前端 未结 6 1199
鱼传尺愫
鱼传尺愫 2020-12-28 20:50

I am working on saving twitter search results into a database (SQL Server) and am getting an error when I pull the search results from twitteR.

If I execute:

<
6条回答
  •  借酒劲吻你
    2020-12-28 21:22

    I use this code I found from http://blog.ouseful.info/2011/11/09/getting-started-with-twitter-analysis-in-r/ a while ago:

    #get data
    tws<-searchTwitter('#keyword',n=10)
    
    #make data frame
    df <- do.call("rbind", lapply(tws, as.data.frame))
    
    #write to csv file (or your RODBC code)
    write.csv(df,file="twitterList.csv")
    

提交回复
热议问题