rtweet_net | R Documentation |
This function creates an igraph network graph from a tibble of tweets details created by rtweet functions (e.g. search_tweets, get_timeline, parse_stream, lookup_statuses, lookup_tweets etc.)
rtweet_net( tweetdf, all_mentions = TRUE, from_threshold = 0, directed_graph = FALSE )
tweetdf |
An rtweet tibble of tweets. (90 columns? - depending on version). |
all_mentions |
Whether to include all the mentions (TRUE/FALSE). Defaults to TRUE, if set to FALSE will include only Replies, Retweets and Quotes (any additional tagged screen_names will be ignored) |
from_threshold |
A filter to simplify graphs, removes edges where the "from" node has less than a set level of connections. Default is 0. |
directed_graph |
Directed graph? (TRUE/FALSE), default is FALSE (i.e. undirected graph output) |
tweets <- rtweet::search_tweets("#rstats", n= 100) network <- rtweet_net(tweets, all_mentions = TRUE, from_threshold =2) plot(network)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.