If you have a dataframe that represents a graph and you don't want to turn it into an igraph/tidygraph object first, this function will turn it into a csv. Give the column name where the edges start and the column name of the edge end. If you don't specify it, this function expects the first column to be a the start and second column the end point of an edge.

gephi_write_edges_from_df(
  dataframe,
  from = NULL,
  to = NULL,
  path,
  na = "",
  verbose = TRUE
)

Arguments

dataframe

which dataframe

from

which column does the edge start

to

which column does the edge end

path

the file where to save to e.g.: edges.csv or data/edges.csv

na

How to record missing values, defaults to "", nothing / empty values

verbose

by default these functions are chatty and will tell you what they do if you do not want that, set to FALSE

Value

invisible original object so you could continue using it in a pipe if you want to

See also

Other write_graphs: gephi_write_nodes()