[R] Problem with package twitteR and converting S4 obj to data frame
altons
albertonegron at gmail.com
Thu Jan 6 19:44:07 CET 2011
Hi,
I wrote a simple script to retrieve an n number of followers for a given
user in Twitter. I used a sample of n=10 to test my script and worked
perfectly but once I started to changes n I started to get the following
error:
Error in list_to_dataframe(res, attr(.data, "split_labels")) :
Results do not have equal lengths
I have no clue why works fine with n=10 but for higher values fall over. Any
Suggestions?
Below is my script.
Thanks,
Alberto
library(plyr)
library(twitteR)
getuser <- getUser('altons')
count <- 50
UserFollowers <-userFollowers(getuser, n=count, session = getCurlHandle())
dffollow <- ldply(userFollowers(getuser, n=count, session =
getCurlHandle()),
function(x) c(screenName=x at screenName
,name=x at name
,statusesCount =x at statusesCount
,followersCount=x at followersCount
,friendsCount=x at friendsCount
,TwitterBirth=x at created
,description=x at description
,location=x at location)
)
--
View this message in context: http://r.789695.n4.nabble.com/Problem-with-package-twitteR-and-converting-S4-obj-to-data-frame-tp3177948p3177948.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list