rtweet (version 0.4.0)

lookup_users: lookup_users

Description

Returns Twitter user data_frame object for specified user_ids or screen_names.

Usage

lookup_users(users, token = NULL, parse = TRUE, tw = TRUE,
  clean_tweets = TRUE, as_double = FALSE)

Arguments

users

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).

tw

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

clean_tweets

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

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 users: search_users, users_data

Examples

Run this code
# NOT RUN {
# lookup vector of 1 or more user_id or screen_name
users <- c("potus", "hillaryclinton", "realdonaldtrump",
  "fivethirtyeight", "cnn", "espn", "twitter")

usr_df <- lookup_users(users)
usr_df

# view tweet data for these users via tweets_data()
tweets_data(usr_df)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace