View source: R/Create.activity.twitter.R
Create.activity.twitter | R Documentation |
Creates a twitter activity network from collected tweets. Nodes are tweets and directed edges represent the relationship of tweets to one another. For example, there is a directed edge from a quote tweet towards the tweet that was quoted. Stand-alone tweets that are not replies, retweets or quote tweets have no relation to others and will be isolates.
## S3 method for class 'activity.twitter' Create(datasource, type, rmEdgeTypes = NULL, verbose = FALSE, ...)
datasource |
Collected social media data with |
type |
Character string. Type of network to be created, set to |
rmEdgeTypes |
Character vector. List of tweet edge types to remove from network. Options are |
verbose |
Logical. Output additional information. Default is |
... |
Additional parameters passed to function. Not used in this method. |
Network as a named list of two dataframes containing $nodes
and $edges
.
## Not run: # create a twitter activity network with retweets removed activity_net <- twitter_data |> Create("activity", rmEdgeTypes = c("retweet")) # network nodes and edges names(activity_net) # "nodes", "edges" names(activity_net$nodes) # "status_id", "author_id", "author_screen_name", "created_at" names(activity_net$edges) # "from", "to", "user_id", "screen_name", "created_at", "edge_type" ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.