Learn R Programming

vosonSML (version 0.29.13)

vosonSML::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 actor node attributes.

Usage

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

Value

Network as a named list of two dataframes containing $nodes, $edges and $users. Nodes include columns for additional user data.

Arguments

net

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

data

A dataframe generated by Collect.

lookupUsers

Logical. Lookup user profile information 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 TRUE.

twitterAuth

A twitter authentication object from Authenticate.

verbose

Logical. Output additional information about the network creation. Default is TRUE.

...

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

Examples

Run this code
if (FALSE) {
# add user info to a twitter actor network
actorNetwork <- collectData %>%
  Create("actor") %>% AddUserData(collectData, twitterAuth = myTwitterAuth)

# network
# actorNetwork$nodes
# actorNetwork$edges
}

Run the code above in your browser using DataLab