Convert Various Objects to network
graphs.
as_tweet_network( x, target_class = target_class, all_status_data = all_status_data, all_user_data = all_user_data, ... ) # S3 method for proto_net as_tweet_network(x, ...) # S3 method for data.frame as_tweet_network( x, target_class = c("user", "hashtag", "url", "media"), all_status_data = FALSE, all_user_data = FALSE, ... )
x | Tweet data frame or |
---|---|
target_class |
|
all_status_data |
|
all_user_data |
|
... | Arguments passed to or from other methods. |
path_to_tweet_file <- example_tweet_file() tweet_df <- read_tweets(path_to_tweet_file) tweet_df %>% as_tweet_network()#> Network attributes: #> vertices = 1228 #> directed = TRUE #> hyper = FALSE #> loops = TRUE #> multiple = TRUE #> bipartite = FALSE #> total edges= 1234 #> missing edges= 0 #> non-missing edges= 1234 #> #> Vertex attribute names: #> vertex.names #> #> Edge attribute names not shown#> Network attributes: #> vertices = 1228 #> directed = TRUE #> hyper = FALSE #> loops = TRUE #> multiple = TRUE #> bipartite = FALSE #> total edges= 1234 #> missing edges= 0 #> non-missing edges= 1234 #> #> Vertex attribute names: #> vertex.names #> #> Edge attribute names not showntweet_df %>% as_tweet_network(all_status_data = TRUE)#> Network attributes: #> vertices = 1228 #> directed = TRUE #> hyper = FALSE #> loops = TRUE #> multiple = TRUE #> bipartite = FALSE #> total edges= 1234 #> missing edges= 0 #> non-missing edges= 1234 #> #> Vertex attribute names: #> vertex.names #> #> Edge attribute names not showntweet_df %>% as_tweet_network(all_user_data = TRUE)#> Network attributes: #> vertices = 1228 #> directed = TRUE #> hyper = FALSE #> loops = TRUE #> multiple = TRUE #> bipartite = FALSE #> total edges= 1234 #> missing edges= 0 #> non-missing edges= 1234 #> #> Vertex attribute names: #> account_created_at account_lang bbox_coords description favourites_count followers_count friends_count listed_count location name.y profile_banner_url profile_image_url profile_url protected screen_name statuses_count timestamp_ms url verified vertex.names #> #> Edge attribute names not shown