Learn R Programming

graphTweets (version 0.5.3)

gt_collect: Collect

Description

Collect

Usage

gt_collect(gt)

Arguments

gt

An object of class graphTweets as returned by gt_edges and gt_nodes.

Value

A named list of tibble 1) edges and 2) nodes.

Examples

Run this code
# NOT RUN {
# simulate dataset
tweets <- data.frame(
  text = c("I tweet @you about @him", 
           "I tweet @me about @you"),
  screen_name = c("me", "him"),
  retweet_count = c(19, 5),
  status_id = c(1, 2),
  stringsAsFactors = FALSE
)

tweets %>% 
  gt_edges(text, screen_name, status_id) %>% 
  gt_nodes() %>% 
  gt_collect() -> net

# }

Run the code above in your browser using DataLab