AddUserData.twomode.twitter {vosonSML} | R Documentation |
Supplement twitter 2mode 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 class 'twomode.twitter'
AddUserData(
net,
data,
lookupUsers = FALSE,
twitterAuth = NULL,
retryOnRateLimit = TRUE,
refresh = FALSE,
rmMisc = TRUE,
verbose = FALSE,
...
)
Arguments
net |
A named list of dataframes |
data |
A dataframe generated by |
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 |
twitterAuth |
A twitter authentication object from |
retryOnRateLimit |
Logical. When the API rate-limit is reached should the collection wait and resume when it
resets. Default is |
refresh |
Logical. Lookup and replace all available user metadata. Default is |
rmMisc |
Logical. Remove miscellaneous user data columns such as user profile colors and other visual elements.
Default is |
verbose |
Logical. Output additional information. Default is |
... |
Additional parameters passed to function. Not used in this method. |
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
.
Note
Using the standard twitter API this function is limited to collecting profiles of 90000 users per 15 mins before hitting the rate limit.
Examples
## Not run:
# add user info to a twitter 2mode network
net_2mode <- data_collect |>
Create("twomode") |>
AddUserData(data_collect)
## End(Not run)