Learn R Programming

rtweet (version 0.4.0)

lookup_statuses: lookup_tweets

Description

Returns Twitter user data_frame object for specified user_ids or screen_names.

Usage

lookup_statuses(statuses, token = NULL, parse = TRUE, usr = TRUE,
  clean_tweets = FALSE, as_double = FALSE)

Arguments

statuses

User id or screen name of target user.

token

OAuth token (1.0 or 2.0). By default token = NULL fetches a non-exhausted token from an environment variable @describeIn tokens.

parse

Logical, indicating whether or not to parse return object into data frame(s).

usr

Logical indicating whether to return users data frame. Defaults to true.

clean_tweets

logical indicating whether to remove non-ASCII characters in text of tweets. defaults to FALSE.

as_double

logical indicating whether to handle ID variables as double (numeric) class. By default, this is set to FALSE, meaning ID variables are treated as character vectors. Setting this to TRUE can provide performance (speed and memory) boost but can also lead to issues when printing and saving, depending on the format.

Value

json response object (max is 18000 per token)

See Also

https://dev.twitter.com/overview/documentation

Other tweets: get_favorites, get_timeline, search_tweets, stream_tweets, tweets_data

Examples

Run this code
# NOT RUN {
# lookup tweets data via status_id vector
statuses <- c("567053242429734913", "266031293945503744",
  "440322224407314432")
statuses <- lookup_statuses(statuses)
statuses

# view users data for these statuses via tweets_data()
users_data(statuses)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab