I am trying to run lookup_users on a dataset that contains 8 million Twitter user_ids. However, the Twitter rate limit does not allow me to get the data of more than 90,000 user-ids.
Is there a way to use the lookup_users function for more than the max 90,000 user_ids?
I use the following code but it does not work:
data <- vector("list", length(dataset$user_id)) # my dataset has a column called user_id
for (i in seq_along(dataset)) {
data[[i]] <-
lookup_users(dataset$user_id[i])
Sys.sleep(15*60) #900 seconds or 15 minitues sleep
}
Thanks @nirgrahamuk. The documentation says it can be done through looping the function, and this is what I want to figure out how to do. Actually the loop does not work. Actually someone has provided a solution here, but again I get error while running the codes: https://github.com/ropensci/rtweet/issues/118
My dataset contains 8M user_id of a Twitter account followers. I want to retrieve the most recent tweets posted by the followers of the Twitter account.
Using the exact code in the link (the code posted by 'neilcharles' in https://github.com/ropensci/rtweet/issues/118) does not do anything in RStudio, thus doesn’t get any result.
When I replace all "users" in the codes by "mydataset$user_ids", I get the following error:
Regardless of the above error, RStudio starts running. However, it does not stop, even when I run the codes on a small subset of data (i.e. 100 user_ids). I have to click the 'stop' sign in console to terminate it, which gives ONLY gives me results for a small proportion of the data.
If I remove $user_ids from the first line (lookup_many_users…) and leave it in the rest of the codes again I get no result.
the exact code provided is a function definition. So you would pass your parameters when calling it, rather than editing your own objects into it. At least for performing the look up of users activity.
How would you describe your current level of R knowledge?
ah well you'll have used plenty of functions , pretty much everytime there were regular brackets () , is a function call. I suppose you are saying that you havent defined your own functions before.