Dear R-List,

I am trying to develop a tutorial on how to analyze network data from Twitter 
conversations for a network analysis class that I teach. I came across the 
twitteR package, and saw some examples of it in action on various websites. It 
is easy to use, and almost as easy to understand. I was able to pull sets of 
Twitter messages into a dataframe using various criteria (hashtags, etc.). To 
build a network, I would like to follow which messages are responses to earlier 
messages. According to the twitteR package documentation, this is stored in a 
'replyToSN' field (reply to Screenname). However, when I do searches this field 
is always blank (NA). (The similar field replyToSID is also always blank.) The 
Twitter messages themselves suggest that there are some replies in the sets 
that I'm obtaining, so I now in theory that these fields should not be blank 
for every message.

Here is some code and output to make this clearer:

library(twitteR)
library(plyr)
tweets = searchTwitter("#Rstats", n=200)
tweets[[4]]$getText()

[1] "RT @kdnuggets: Great post on using parallel processing with R and HHP $3M 
competition http://bit.ly/rcfztQ #rstats #hhp #datamining"

tweets[[4]]$getScreenName()

[1] "dichika"

tweets[[4]]$getReplyToSN()
character(0)

tweets.df = ldply(tweets, function(t) t$toDataFrame())
head(tweets.df[,c(3,4,6,10)])


  replyToSN             created replyToSID    screenName
1        NA 2011-07-23 01:56:46         NA        cmprsk
2        NA 2011-07-23 01:38:58         NA      muteokie
3        NA 2011-07-23 00:27:32         NA floss4science
4        NA 2011-07-23 00:16:06         NA       dichika
5        NA 2011-07-22 22:20:55         NA        cmprsk
6        NA 2011-07-22 21:50:43         NA          siah

I hope I'm missing something simple, but my gut tells me that I need to do some 
type of authentification before this information will be returned. I couldn't 
find any useful examples of this issue or how to get around it after looking 
for a while.

Thanks,

Douglas Luke

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to