gt_dyn {graphTweets}R Documentation

Dynamise

Description

Create a dynamic graph to import in Gephi.

Usage

gt_dyn(gt, lifetime = Inf)

Arguments

gt

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

lifetime

Lifetime of a tweet in milliseconds, defaults to Inf.

Examples

## Not run: 
# simulate dataset
tweets <- data.frame(
  text = c("I tweet @you about @him and @her", 
           "I tweet @me about @you"),
  screen_name = c("me", "him"),
  created_at = c(Sys.time(), Sys.time() + 10000),
  status_id = c(1, 2),
  stringsAsFactors = FALSE
)

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

## End(Not run)


[Package graphTweets version 0.5.3 Index]