View source: R/writing_tools.R
gephi_write_nodes | R Documentation |
write_nodes will write the nodes, and write_edges will write the edges to a csv file. You will alway want to use the write_edges function, the write nodes function has only added value if the nodes have attributes, such as Label, Age, color etc.
gephi_write_nodes(graph, path, na = "", verbose = TRUE) gephi_write_edges(graph, path, na = "", verbose = TRUE) gephi_write_both(graph, pathedges, pathnodes, na = "", verbose = TRUE)
graph |
The igraph or tidygraph object your work with |
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 |
pathedges |
where to save the edges file e.g.: 'edges.csv' |
pathnodes |
where to save the nodes file e.g.: 'nodes.csv' |
If the file is not an igraph / tidygraph object, but a dataframe you could use the write_*_from_df functions. This function will assume the edges are between the first and second column, but you can specify if that is not the case.
invisible original object so you could continue using it in a pipe if you want to
gephi_write_edges
: Write nodes data to csv
gephi_write_both
: Write both node and edge data away
Other write_graphs:
gephi_write_edges_from_df()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.