-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Description
Hi!
I'm running this snippet on a csv file containing 200 user names:
library("tweetbotornot")
rts <- read.csv(file="rts.csv", header=TRUE, sep=",")
data <- tweetbotornot(rts$Twitter.Name, fast = TRUE)
I'm setting the fast argument on, however I'm getting this error:
Warning message:
“Rate limit exceeded - 88”
Error in if (n%/%200 < n.times) {: argument is of length zero
Traceback:
- botornot(rts$Twitter.Name, fast = TRUE)
- botornot.factor(rts$Twitter.Name, fast = TRUE)
- botornot(x, fast = fast)
- botornot.character(x, fast = fast)
- rtweet::get_timelines(x, n = 100)
- get_timeline(user, n, max_id, home, parse, check, token, ...)
- do.call("get_timeline_", args)
- get_timeline_(user = c("---list of users---), n = 100, home = FALSE, max_id = NULL,
. parse = TRUE, check = TRUE, token = NULL) - Map(get_timeline_call, user = user, n = n, home = home, MoreArgs = dots)
- mapply(FUN = f, ..., SIMPLIFY = FALSE)
- (function (user, n = 200, max_id = NULL, home = FALSE, parse = TRUE,
. check = TRUE, token = NULL, ...)
. {
. stopifnot(is_n(n), is.atomic(user), is.atomic(max_id), is.logical(home))
. if (home) {
. query <- "statuses/home_timeline"
. }
. else {
. query <- "statuses/user_timeline"
. }
. if (length(user) > 1) {
. stop("can only return tweets for one user at a time.",
. call. = FALSE)
. }
. token <- check_token(token)
. if (check) {
. rl <- rate_limit(token, query)
. n.times <- rl[["remaining"]]
. if (n%/%200 < n.times) {
. n.times <- ceiling(n/200L)
. }
. }
. else {
. rl <- NULL
. n.times <- ceiling(n/200L)
. }
. if (n.times == 0L) {
. if (!is.null(rl)) {
. reset <- round(as.numeric(rl[["reset"]], "mins"),
. 2)
. }
. else {
. reset <- "An unknown number of"
. }
. warning("rate limit exceeded. ", round(reset, 2), " mins until rate limit resets.",
. call. = FALSE)
. return(data.frame())
. }
. if (n < 200) {
. count <- n
. }
. else {
. count <- 200
. }
. params <- list(user_type = user, count = count, max_id = max_id,
. tweet_mode = "extended", ...)
. names(params)[1] <- .id_type(user)
. url <- make_url(query = query, param = params)
. tm <- scroller(url, n, n.times, type = "timeline", token)
. if (parse) {
. tm <- tweets_with_users(tm)
. }
. tm
. })(user = dots[[1L]][[1L]], n = dots[[2L]][[1L]], home = dots[[3L]][[1L]],
. max_id = NULL, parse = TRUE, check = TRUE, token = NULL)
Am i doing something wrong?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels