In this blog-post, we would see how you can grab Twitter search data using R and then export it to tab delimited file. Here are the steps:
1) First up, if we do not have R – you can install it by following the tutorial: Let’s install R Studio and R on windows machine
2) Instal Package: TwitteR if you haven’t
3) Look at the following code, modify the path in line #4 for write.table:
> require(twitteR)
> tweets <- searchTwitter(“#excel”,n=1500)
> tweetdataframe <- do.call(“rbind”,lapply(tweets,as.data.frame))
> write.table(tweetdataframe,”c:/users/paras/desktop/tweetsaboutexcel.txt”,sep=”\t”)
4) so now you have tab delimited file having about 1500 tweets!
You can also export the tweets to Excel spreadsheet, SPSS and SAS. Check this out: quick R Exporting Data
Conclusion:
In this blog-post, we saw how you can grab 1500 tweets using R and then export it to a tab delimited file.

Pingback: How to Load Twitter data into Hadoop on Azure cluster and then analyze it via Hive add-in for excel? | Paras Doshi – Blog
Pingback: I played with Twitter Firehose for couple of hours and how you can do so too: | Paras Doshi – Blog
Pingback: Sentiment Analysis in R w/ Twitter data feeds | Paras Doshi – Blog
Pingback: How to start Analyzing Twitter Data w/ R? | Paras Doshi – Blog
Step-3 shows how to get 1500 tweets. Is there a way to get TOP 1500 tweets based on a Hash Tag?
What’s your criteria for “TOP”?
- Top RT’ed tweets?
- From person who has the most followers?
- Latest 1500 tweets?
Let’s take it forward after that.