gt_save: Save

Description Usage Arguments Examples

View source: R/overhaul.R

Description

Save the graph to file.

Usage

1
gt_save(gt, file = "graphTweets.graphml", format = "graphml", ...)

Arguments

gt

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

file

File name including extension (format).

format

Format file format, see write_graph.

...

Any other argument to pass to write_graph.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## 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),
  created_at = c(Sys.time(), Sys.time() + 15000),
  status_id = c(1, 2),
  stringsAsFactors = FALSE
)

tweets %>% 
  gt_edges(text, screen_name, "created_at") %>% 
  gt_nodes(TRUE) %>% 
  gt_dyn() %>% 
  gt_save()

## End(Not run)

graphTweets documentation built on Jan. 8, 2020, 9:07 a.m.