write_graphml: Write Gephi-Friendly .graphml Files

Description Usage Arguments Author(s) Examples

View source: R/graphml.R

Description

Simple, safe transformation of attributes to values with which Gephi will cooperate.

Usage

1
write_graphml(g, file_path, na_numbers_as = -1, na_characters_as = "", ...)

Arguments

g

igraph::graph() object

file_path

File path to which to write or from which to read.

na_numbers_as

numeric(1L), Default: -1. Value to replace NA_real_/NA_integer_s in the resulting file.

na_characters_as

character(1L), Default: "". Value to replace NA_character_s in the resulting file.

...

Arguments passed to or from other methods.

Author(s)

Brendan Knapp brendan.g.knapp@nps.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
path_to_tweet_file <- example_tweet_file()

tweet_df <- read_tweets(file_path = path_to_tweet_file)

tweet_graph <- as_igraph(tweet_df)
tweet_graph

graphml_path <- tempfile(fileext = ".graphml")
graphml_path

write_graphml(tweet_graph, file_path = graphml_path) 

knapply/tweetio documentation built on Dec. 22, 2020, 7:15 p.m.