Learn R Programming

vosonSML (version 0.32.7)

AddUserData.actor.twitter: Supplement twitter actor network by adding user profile attributes to nodes

Description

Network is supplemented with additional downloaded user information applied as 2mode node attributes.

Usage

# S3 method for actor.twitter
AddUserData(
  net,
  data,
  lookupUsers = FALSE,
  twitterAuth = NULL,
  retryOnRateLimit = TRUE,
  refresh = FALSE,
  rmMisc = TRUE,
  verbose = FALSE,
  ...
)

Value

Network as a named list of three dataframes containing $nodes, $edges. Nodes include columns for additional user profile data and metrics. Referenced users for which no data was found are returned in missing_users.

Arguments

net

A named list of dataframes nodes and edges generated by Create.

data

A dataframe generated by Collect.

lookupUsers

Logical. Lookup user profile metadata using the twitter API for any users data missing from the collect data set. For example fetches profile information for users that became nodes during network creation because they were mentioned in a tweet but did not author any tweets themselves. Default is FALSE.

twitterAuth

A twitter authentication object from Authenticate.

retryOnRateLimit

Logical. When the API rate-limit is reached should the collection wait and resume when it resets. Default is TRUE.

refresh

Logical. Lookup and replace all available user metadata. Default is FALSE.

rmMisc

Logical. Remove miscellaneous user data columns such as user profile colors and other visual elements. Default is TRUE.

verbose

Logical. Output additional information. Default is FALSE.

...

Additional parameters passed to function. Not used in this method.

Examples

Run this code
if (FALSE) {
# add user info to a twitter actor network
net_actor <- data_collect |>
  Create("actor") |>
  AddUserData(data_collect)
}

Run the code above in your browser using DataLab