Get tweet-count via twitteR-package
The example in the vignette looks like this (p. 5):
sapply(publicTimeline(), function(x) x$getStatusSource())
I can extract even the ScreenName or the user-ID:
sapply(publicTimeline(), function(x) x$getScreenName())
sapply(publicTimeline(), function(x) x$getID())
In fact, the publicTimeline-function catches random users and I'd like to have given users.
Anyone can help me?
Regards,
ArneYou'll want to first getUser for a specific user. Then, you can use str() to understand the structure of that user. The @ symbol is used to access fields in S4 objects.
Example:
> library(twitteR)
> user <- getUser("@twitter")
> user@statusesCount
[1] 1087
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论